Skip to content

Commit 54b532a

Browse files
committed
Add loguru acesss utils.
1 parent 8104a5c commit 54b532a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

llms_wrapper/utils_loguru.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""Module to simplify inspection of current loguru settings"""
2+
3+
from loguru import logger
4+
5+
def handlers() -> dict:
6+
return logger._core.handlers
7+
8+
def is_enabled(module: str) -> bool:
9+
al = logger._core.activation_list
10+
module = module + "."
11+
return next((x for x in al if x[0] == module), None)
12+

0 commit comments

Comments
 (0)