Skip to main content

Python Logging Output

· 2 min read
Lejen

Complete table showing the various information that the logging system can output:

%(name)sLogger's name
%(levelno)sLog level in digital form
%(levelname)sLog level in text form
%(pathname)sThe full path name of the module that called the log output function, may not have
%(filename)sThe file name of the module that called the log output function
%(module)sCall the module name of the log output function
%(funcName)sCall the function name of the log output function
%(lineno)dThe line of code where the statement that called the log output function is located
%(created)fCurrent time, expressed in floating point numbers representing the time of the UNIX standard
%(relativeCreated)dThe number of milliseconds since the Logger was created when the log information was output.
%(asctime)sThe current time in the form of a string. The default format is "2003-07-08 16:49:45,896". Behind the comma is the millisecond
%(thread)dThread ID. Maybe not
%(threadName)sThread name. Maybe not
%(process)dProcess ID. Maybe not
%(message)sUser output message