Initial commit
This commit is contained in:
13
llamaCpp.Wrapper.app/logging_utils.py
Normal file
13
llamaCpp.Wrapper.app/logging_utils.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import logging
|
||||
import os
|
||||
|
||||
|
||||
def configure_logging() -> None:
|
||||
if logging.getLogger().handlers:
|
||||
return
|
||||
level_name = os.getenv("LOG_LEVEL", "INFO").upper()
|
||||
level = getattr(logging, level_name, logging.INFO)
|
||||
logging.basicConfig(
|
||||
level=level,
|
||||
format="%(asctime)s %(levelname)s %(name)s: %(message)s",
|
||||
)
|
||||
Reference in New Issue
Block a user