Updated on 2022-03-13 GMT+08:00

Configuring Log System

Configuring Log Levels

The framework provides five log levels: error > warning > info > debug > event.

Event logs record the most critical logs of the system and must be set separately.

For the other four log levels, logs of the specified level and higher can all be printed.

  1. Enter the developer mode by following the instructions provided in Accessing the Atlas 500 Development Mode.
  2. Run the vi /etc/slog.conf command to open the log configuration file. Its default content is as follows:

    # Global log level 
    global_level=3 
     
    # User 
    user=HwHiAiUser 
     
    # Share memory size of node 512k * 32 biggest support 
    maxNodeSize=524272 
     
    # Share memory count of queue 
    maxQueueCount=40 
     
    # log-agent-host # 
    logAgentMaxFileNum=8 
    # set host one log file max size, range is (0, 104857600] 
    logAgentMaxFileSize=10485760 
    # set host log dir 
    logAgentFileDir=/var/dlog 
    ...

  3. Change the global_level value in the log configuration file to change the log level. The global_level value corresponding to each log level is as follows. After the modification, save the /etc/slog.conf file.

    0: debug

    1: info

    2: warning

    3: error

  4. Restart the OS for the modifications to take effect.