Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Logging log output module

Shulou Source: shulou.com Published: 2022-06-01 07:40:02 10月03日 Update

Import logging

This module is used to print the output format

Logging.basicConfig (level=logging.INFO,format='% (asctime) s% (levelname) s [% (threadName) s] -% (message) s')

Level:

Logging.INFO: log level

Format:

% (asctime) s: print out time

% (levelname) s: print out log level

% (threadName) s: thread name

% (message) s: print out the output message

Print out the output information:

Logging.info ('test')

Tags: Output log level module information name time format message thread Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Technology Microsoft Redmi Docker