Legato comes with a command line tool to set logging variables for Legato components. Executed commands are translated and sent to the Legato log daemon, which forwards it to the correct destination. The Log Control Daemon uses filters to log needed messages, discarding unnecessary ones.
Legato Logging Commands
Logging API
The general format of log commands is:
$ log command commandParameter in destination
Here are some command samples:
Set the log level to INFO for a component in a process:
$ log level INFO in "processName/componentName"
Enable a trace:
$ log trace "keyword" in "processName/componentName"
Disable a trace:
$ log stoptrace "keyword" in "processName/componentName"
All can use "*" in place of processName and componentName to mean all processes and/or all components. If the "processName/componentName" is omitted, the default destination is set for all processes and all components. In the samples, the 'in' is optional.
The translated command to send to the log daemon has this format:
where, cmd is a command code, one byte long. destination is the "processName/componentName" followed by a '/' character. commandParameter is the string specific to the command.
Copyright (C) Sierra Wireless, Inc. 2014. All rights reserved. Use of this work is subject to license.