Element Path <cwt><CORE><logging>
The logging feature is used to create log files on the SD card with log entries from the CWT application. By specifying log modules and log levels it is possible to select which type of logging information (from which software modules) that will be included in the log files. The log files will be saved in the folder “\Storage Card” on the SD card. The files will be named OSLOG<N>.TXT, where N is 0–9.
The log levels are cumulative. Debug gives the most log messages and Fatal gives the least. For example, when Info is set for a log module, both Info, Warn and Fatal levels will be logged for that module.
If no logging entry exists in the cwtconfig.xml file, the default log level for all log modules will be Error.
attributes
defaultLogLevel
Range: | logLevel values: |
Debug: Detailed messages for debugging purposes.
Info: Interesting events like start up and state changes.
Warn: Unexpected or potentially dangerous events, “almost errors”.
Error: Error (default log level).
Fatal: Fatal error causing the CWT application to terminate or reboot.
Off: Turns OFF all application logging.
Default: Error
Description: | Sets the log level that will be used for all log modules that have not been assigned a log level with the logLevel attribute. |
numberOfLogFiles
Range: | 1–10 |
Default: | 3 |
Description: | Maximum number of log files saved. |
Example: | Set the log level Warn for all log modules, except CoreApi, Modem and Utility. Set the log level Debug for the log modules CoreApi, Modem and Utility. Set the maximum number of log files to 6: |
<CORE>
<logging defaultLogLevel="Debug" numberOfLogFiles="10" archiveHour="14" archiveMinute="50" archiveSizeLimitMegaBytes="5"/>
<set logModule="CoreApi" logLevel="Debug"/>
<set logModule="Modem" logLevel="Debug"/>
<set logModule="Utility" logLevel="Debug"/>
</logging>
</CORE>
Example: | To disable all logging: |
<CORE …="">
<logging defaultLogLevel="Off" />
</CORE>
archiveHour
Range: | 0 to 23 |
Default: | 0 |
Description: | set the hour the archiving will be executed |
archiveMinute, default is 30
Range: | 0 to 59 |
Default: | 30 |
Description: | Sets the minutes the archiving will be executed |
archiveSizeLimitMegaBytes, default is 0
Range: | 0 to 126 |
Default: | 0 |
Description: Sets the maximum size of the archive in Mb. No limit is set when set to zero (0)