0
Follow
0
View

Question about #python# : Why is output not in log format

daiyong126 注册会员
2023-02-25 10:04

the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > if your output is not your desired format, It is possible that the logging information was not properly logged using the logger instance after calling the log() method. You can call the get_log() method in your code to get the logger instance, and then use the logger instance's methods(such as info(), debug(), error(), and so on) to log information. For example:

log = GetLog.get_log()
log.info("This is an info log message.")
log.debug("This is a debug log message.")

This allows you to write log information to a file and format it for output in a predefined format.

About the Author

Question Info

Publish Time
2023-02-25 10:04
Update Time
2023-02-25 10:04

Related Question

Python teacher让交200行的程序,求各位给点思路

Python编写二十四个节气完整代码

Python Kivy -跨不同的类调用方法

关于#Python爬虫#的问题

分别使用两组python代码进行词云生成,虽然正常运行,但是图形蒙版均未能生效,求指导!

【python】便捷表示从1-30的组内相同数据

为什么文件原本是Python的图标变成vscode的

关于python与plc通讯的相关问题

怎么用Python控制指定某个程序里的键盘

python初学者,b这个不会算