log

Use the Log tool tool to set logging variables for components. Also see Use Logs.

Here's more detailed info on the Logging API.

Usage

log list
log level FILTER_STR [DESTINATION]
log trace KEYWORD_STR [DESTINATION]
log stoptrace KEYWORD_STR [DESTINATION]
log forget PROCESS_NAME
log help

log list 

Lists all processes/components registered with the log daemon.

log level FILTER_STR [DESTINATION] 

Sets the log filter level. Log messages that are less severe than the filter are ignored.
Must be one of EMERGENCY | CRITICAL | ERROR | WARNING | INFO | DEBUG

log trace KEYWORD_STR [DESTINATION] 

Enables a trace by keyword. Any traces with a matching keyword are logged. The KEYWORD_STR is a trace keyword.

log stoptrace KEYWORD_STR [DESTINATION] 

Disables a trace keyword. Any traces with this keyword are not logged. The KEYWORD_STR is a trace keyword.

log forget PROCESS_NAME

Forgets all settings for processes for the specified name.

log help 

Displays help for log commands.

[DESTINATION] 
Optional, specifies the process and component where to send the command.
The optional [DESTINATION] must be in this format:
process/componentName 
'process' can be a processName or a PID. If it's a processName, the command will apply to all processes with the same name. If it's a PID, it only apply to the process with the matching PID.
Both the 'process' and the 'componentName' can be replaced with an asterix ("*)" to mean all processes and/or all components.
If the [DESTINATION] is omitted, a default destination is used and applies to all processes and all components:

"*/*" 
A command can be sent to a process/component that doesn't exist yet. It'll be saved and applied to the process/component when available. This way, you can pre-configure processes/components before they are spawned, but it's only valid if the [DESTINATION] is a process name. Otherwise, the 'process' will be dropped."

Here are some command samples:

$ log level INFO "processName/componentName"

Set the log level to INFO for a component in a process.

$ log trace "keyword" "processName/componentName"

Enable a trace.

$ log stoptrace "keyword" "processName/componentName"

Disable a trace.

All can use "*" in place of processName and componentName for all processes and/or all components. If the "processName/componentName" is omitted, the default destination is set for all processes and all components.

Translated command to send to the log daemon:

   | cmd | destination | commandParameter |

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. Use of this work is subject to license.