Initial commit of document-service
This commit is contained in:
13
app/logger.py
Normal file
13
app/logger.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import logging
|
||||
from app.config import settings
|
||||
|
||||
def setup_logging():
|
||||
"""Setup logging configuration"""
|
||||
logging.basicConfig(
|
||||
level=getattr(logging, settings.log_level.upper()),
|
||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
||||
)
|
||||
|
||||
def get_logger(name: str) -> logging.Logger:
|
||||
"""Get logger with specified name"""
|
||||
return logging.getLogger(name)
|
||||
Reference in New Issue
Block a user