# log

Source: [https://docs.qualcomm.com/doc/80-41102-4/topic/log.html](https://docs.qualcomm.com/doc/80-41102-4/topic/log.html)

Use the Log tool to set logging variables for components.

## Usage

    log list
    log level FILTER_STR [DESTINATION]
    log trace KEYWORD_STR [DESTINATION]
    log stoptrace KEYWORD_STR [DESTINATION]
    log forget PROCESS_NAME
    log helpCopy to clipboard

- `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 Copy to clipboard

    '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:

        "*/*" Copy to clipboard

    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 |Copy to clipboard

    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.

**Parent Topic:** [Target Tools](https://docs.qualcomm.com/doc/80-41102-4/topic/Target-Tools.html)

Last Published: Jan 13, 2025

[Previous Topic
gnss](https://docs.qualcomm.com/bundle/publicresource/80-41102-4/topics/gnss.md) [Next Topic
pm](https://docs.qualcomm.com/bundle/publicresource/80-41102-4/topics/pm.md)