# log
## Command Function
This command is used to modify and query log configurations.
## Syntax
log level \[_levelNum_\]
## Parameters
**Table 1** Parameter description
Parameter
|
Description
|
Value Range
|
levelNum
|
Specifies the print level of logs.
|
[0x0, 0x5]
|
## Usage
- This command depends on **LOSCFG\_SHELL\_LK**. Before using this command, select **Enable Shell lk** on **menuconfig**.
Debug ---\> Enable a Debug Version ---\> Enable Shell ---\> Enable Shell lK
- The **log level** command is used to configure log levels, which can be:
TRACE\_EMG = 0,
TRACE\_COMMON = 1,
TRACE\_ERROR = 2,
TRACE\_WARN = 3,
TRACE\_INFO = 4,
TRACE\_DEBUG = 5
If the level is not within the valid range, a message will be displayed.
- If the **\[levelNum\]** parameter is not specified, the current log level and its usage are printed by default.
## Example
Example:
Run **log level 4**.
## Output
