• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# log<a name="EN-US_TOPIC_0000001133846474"></a>
2
3-   [Command Function](#section128219131856)
4-   [Syntax](#section3894181710519)
5-   [Parameters](#section7693122310515)
6-   [Usage](#section1982111281512)
7-   [Example](#section176301333259)
8-   [Output](#section14354765415)
9
10## Command Function<a name="section128219131856"></a>
11
12This command is used to modify and query log configurations.
13
14## Syntax<a name="section3894181710519"></a>
15
16log level \[_levelNum_\]
17
18## Parameters<a name="section7693122310515"></a>
19
20**Table  1**  Parameter description
21
22<a name="table237mcpsimp"></a>
23<table><thead align="left"><tr id="row243mcpsimp"><th class="cellrowborder" valign="top" width="21%" id="mcps1.2.4.1.1"><p id="p245mcpsimp"><a name="p245mcpsimp"></a><a name="p245mcpsimp"></a><strong id="b3369319192013"><a name="b3369319192013"></a><a name="b3369319192013"></a>Parameter</strong></p>
24</th>
25<th class="cellrowborder" valign="top" width="52%" id="mcps1.2.4.1.2"><p id="p247mcpsimp"><a name="p247mcpsimp"></a><a name="p247mcpsimp"></a><strong id="b12646112413211"><a name="b12646112413211"></a><a name="b12646112413211"></a>Description</strong></p>
26</th>
27<th class="cellrowborder" valign="top" width="27%" id="mcps1.2.4.1.3"><p id="p249mcpsimp"><a name="p249mcpsimp"></a><a name="p249mcpsimp"></a><strong id="b13881153318285"><a name="b13881153318285"></a><a name="b13881153318285"></a>Value Range</strong></p>
28</th>
29</tr>
30</thead>
31<tbody><tr id="row250mcpsimp"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p252mcpsimp"><a name="p252mcpsimp"></a><a name="p252mcpsimp"></a>levelNum</p>
32</td>
33<td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p254mcpsimp"><a name="p254mcpsimp"></a><a name="p254mcpsimp"></a>Specifies the print level of logs.</p>
34</td>
35<td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="p256mcpsimp"><a name="p256mcpsimp"></a><a name="p256mcpsimp"></a>[0x0, 0x5]</p>
36</td>
37</tr>
38</tbody>
39</table>
40
41## Usage<a name="section1982111281512"></a>
42
43-   This command depends on  **LOSCFG\_SHELL\_LK**. Before using this command, select  **Enable Shell lk**  on  **menuconfig**.
44
45    Debug ---\> Enable a Debug Version ---\> Enable Shell ---\> Enable Shell lK
46
47-   The  **log level**  command is used to configure log levels, which can be:
48
49    TRACE\_EMG = 0,
50
51    TRACE\_COMMON = 1,
52
53    TRACE\_ERROR = 2,
54
55    TRACE\_WARN = 3,
56
57    TRACE\_INFO = 4,
58
59    TRACE\_DEBUG = 5
60
61    If the level is not within the valid range, a message will be displayed.
62
63-   If the  **\[levelNum\]**  parameter is not specified, the current log level and its usage are printed by default.
64
65## Example<a name="section176301333259"></a>
66
67Example:
68
69Run  **log level 4**.
70
71## Output<a name="section14354765415"></a>
72
73![](figure/en-us_image_0000001179847649.png)
74
75