|
From: Anders W. <and...@er...> - 2018-01-03 10:43:59
|
See replies inline, marked AndersW>
regards,
Anders Widell
On 12/13/2017 09:34 PM, Carroll, James R wrote:
> Hi All,
>
> We are using OpenSAF 5.2, and have some questions on the usage of the trace mask, and the log levels.
>
> 1. First off, is there any documentation that explains their usage in detail? Can they be used in parallel, are they mutually exclusive, etc. Are there recommended usages and settings for both?
Trace mask and log level are two separate things and can be used
independently of each other. I think the recommended setting for normal
operation would be to have trace disabled and log level set to notice.
> 2. Looking at a sample config file, such as amfd.conf, there is a line that states "uncomment to enable trace". The trace mask is all ones (0xFFFFFFFF). What are my options for the trace mask, is it only ON and OFF, or can I gradually increase levels, say from 0x00000000, to 0x55555555, to 0x77777777, 0XEEEEEEEE), and other values in-between? What do the different nibbles of the mask represent?
It is possible to enable subsets of the log messages by choosing to set
only some of the bits in the bitmask. However, this is not used in a
very consistent way so it is not very useful. Maybe the only thing used
consistently is TRACE_ENTER and TRACE_LEAVE, which are logged at the
start and end of a function, respectively. The trace levels are listed
in logtrace.h:
enum logtrace_categories {
CAT_LOG = 0,
CAT_TRACE,
CAT_TRACE1,
CAT_TRACE2,
CAT_TRACE3,
CAT_TRACE4,
CAT_TRACE5,
CAT_TRACE6,
CAT_TRACE7,
CAT_TRACE8,
CAT_TRACE_ENTER,
CAT_TRACE_LEAVE,
CAT_MAX
};
The corresponding bits are two to the power of the trace level.
> 3. Looking at the same sample config file, there is a line that states "uncomment to enable info level level logging". But perusing the code shows that there are at least 3 log levels (and maybe more?), LOG_INFO, LOG_DEBUG, LOG_NOTICE. What do the different log levels do, and are they hierarchical, so that DEBUG implies INFO+DEBUG?
The log level is similar to the levels in syslog, so yes they are
cumulative. debug implies info and notice.
> Thanks.
>
> Jim
>
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Opensaf-users mailing list
> Ope...@li...
> https://lists.sourceforge.net/lists/listinfo/opensaf-users
>
|