Information
We are currently investigating an issue with the editor of some pages. Please save your work and avoid to create new pages until this banner is gone.
How is possible to set the threshold level of RT logs?
RT logs (==logs that come from RT: kernel or user space) can have one of the following levels (=priorities):
RTLOG_TRACE | 2 | |
RTLOG_DEBUG | 3 | |
RTLOG_INFO | 4 | =RTLOG_NORMAL (removed with ACS-7.0) |
RTLOG_NOTICE | 5 | |
RTLOG_WARNING | 6 | |
RTLOG_ERROR | 8 | |
RTLOG_CRITICAL | 9 | |
RTLOG_ALERT | 10 | |
RTLOG_EMERGENCY | 11 |
There are two ways to set the threshold level for rtlogs:
Compile time threshold level can be set by defining (=sending a compile options to the compiler) RTLOG_LEVEL. This can be set in the makefile. Here are examples of setting the level for user and kernel space code:
USER_CFLAGS = -DRTLOG_LEVEL=0 # for user space USER_RTAI_CFLAGS = -DRTLOG_LEVEL=0 # for kernel modules (=LKMs)
Setting RTLOG_LEVEL to 2 or less it means that we will get RT logs with all priorities.
Default value (=if RTLOG_LEVEL is not set) is: RTLOG_TRACE (=2) lowest possible! (see COMP-1342)
When RTLOG_LEVEL is set to the certain value code for log messages with priorities lower than one set in RTLOG_LEVEL is not not generated, so the performance is improved.
Runtime threshold level can be set by using setLevel method of rtlog component. The current threshold level value can be retrieved using getLevel method.
Be aware that compile time level setting of threshold override the runtime setting. With other words, if you set at compile time the level to 5 (=RTLOG_INFO), you can not set at runtime the level lower than this value, and consequently you can not get logs with priorities lower than RTLOG_INFO.
#CDBSetting
The initial value of the runtime RT log threshold level can be set in the CDB, in the attribute: initLogLevel of RTLOG component.
The default value is 4 (=RTLOG_INFO)!
-- BogdanJeram - 09 Aug 2007