summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhandingkang <[email protected]>2024-01-16 11:30:00 +0800
committerhandingkang <[email protected]>2024-01-16 11:30:00 +0800
commitea9c33a6382727e29e78c576d6dbba73f97c471d (patch)
tree6af8923a847cec3d367d36c77c91f152b7df4782
parenta6612e239f0eaebaa6124c79c7259609fd607439 (diff)
引入日志功能
-rw-r--r--util.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/util.py b/util.py
new file mode 100644
index 0000000..38aeb8e
--- /dev/null
+++ b/util.py
@@ -0,0 +1,7 @@
+import logging
+
+log = logging.getLogger("mylogger")
+
+logging.basicConfig(filename='run.log',
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s-%(funcName)s',
+ level=logging.DEBUG)