Telematics SDK - User Guide
v1.60.0
|
TelSDK provides a configurable logging facility that can be used by application to log messages. This also makes it easier for application to include its messages along with messages from TelSDK library itself.
Use the LOG() API to log any message.
TelSDK has a default configuration for logging which defines behaviour of logging. To override this configuration, a configuration file should be provided to the TelSDK. This file is searched by TelSDK logging mechanism in the following order.
Advantage of using different configuration files by applications is, it allows flexibility to either share the same log file or log in separate files. In QC provided builds, /etc/tel.conf has been used as an example configuration by default for all applications.
Specify name of the log file if log messages are printed on file.
Specify an absolute writable directory where log file(s) will be created. The application must be part of Linux "system" group to access /data/vendor/telsdk directory.
The log messages can be routed to device's console, DIAG and file. This is specified when defining logging level.
Specifies threshold for emitting messages. The messages which are above this threshold appears on log destination.
Console and File logging
DIAG logging
The log messages appears in QXDM tool when DIAG is used as destination. The DIAG defines its own log levels and the mapping of them with TelSDK is given below.
Specify the maximum allowed size(in bytes) of the log file. When the maximum limit is reached, it is saved as tel.log.backup.
Specify whether date and time should be prefixed to log message or not.
Logs can be emitted selectively based on the technology domain by specifying TELUX_LOG_COMPONENT_FILTER.