ZedLow commited on
Commit
28d7a26
·
verified ·
1 Parent(s): 2f45ceb

Update rag/logging_utils.py

Browse files
Files changed (1) hide show
  1. rag/logging_utils.py +9 -13
rag/logging_utils.py CHANGED
@@ -1,19 +1,15 @@
1
  import logging
2
  import sys
3
 
4
- _LOGGING_CONFIGURED = False
5
-
6
- def _configure_logging():
7
- global _LOGGING_CONFIGURED
8
- if _LOGGING_CONFIGURED:
9
- return
10
- logging.basicConfig(
11
- level=logging.INFO,
12
- format="%(asctime)s | %(levelname)s | %(name)s | %(message)s",
13
- handlers=[logging.StreamHandler(sys.stdout)],
14
- )
15
- _LOGGING_CONFIGURED = True
16
 
17
  def get_logger(name: str):
18
- _configure_logging()
 
 
 
 
 
 
 
19
  return logging.getLogger(name)
 
1
  import logging
2
  import sys
3
 
4
+ _CONFIGURED = False
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  def get_logger(name: str):
7
+ global _CONFIGURED
8
+ if not _CONFIGURED:
9
+ logging.basicConfig(
10
+ level=logging.INFO,
11
+ format="%(asctime)s | %(levelname)s | %(name)s | %(message)s",
12
+ handlers=[logging.StreamHandler(sys.stdout)],
13
+ )
14
+ _CONFIGURED = True
15
  return logging.getLogger(name)