# log - [Command Function](#section128219131856) - [Syntax](#section3894181710519) - [Parameter Description](#section7693122310515) - [Usage](#section1982111281512) - [Example](#section176301333259) - [Output](#section14354765415) ## Command Function This command is used to modify and query log configurations. ## Syntax log level \[_levelNum_\] ## Parameter Description **Table 1** Parameters

Parameter

Description

Value Range

levelNum

Indicates the print level of configuration logs.

[0x0, 0x5]

## Usage - This command depends on **LOSCFG\_SHELL\_LK**. Before running this command, enable the **Enable Shell lk** configuration item using **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 is printed. - If the **\[levelNum\]** parameter is not specified, the current log level and its usage are printed by default. ## Example Enter **log level 4**. ## Output ![](figure/en-us_image_0000001052530298.png)