Spaces:
Running
Running
vlff李飞飞
commited on
Commit
•
1d5f6c8
1
Parent(s):
d8c3545
代码清理
Browse files- agent/log.py +1 -17
agent/log.py
CHANGED
@@ -1,17 +1 @@
|
|
1 |
-
import
|
2 |
-
|
3 |
-
|
4 |
-
def setup_logger(level=logging.INFO):
|
5 |
-
logger = logging.getLogger('qwen_agent_logger')
|
6 |
-
logger.setLevel(level)
|
7 |
-
handler = logging.StreamHandler()
|
8 |
-
handler.setLevel(level)
|
9 |
-
formatter = logging.Formatter(
|
10 |
-
'%(asctime)s - %(filename)s - %(lineno)d - %(levelname)s - %(message)s'
|
11 |
-
)
|
12 |
-
handler.setFormatter(formatter)
|
13 |
-
logger.addHandler(handler)
|
14 |
-
return logger
|
15 |
-
|
16 |
-
|
17 |
-
logger = setup_logger()
|
|
|
1 |
+
from loguru import logger
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|