wrongmove/crawler/logger.py

11 lines
282 B
Python
Raw Normal View History

2025-05-12 01:01:19 +01:00
import logging
2025-05-31 23:50:43 +00:00
2025-05-12 01:01:19 +01:00
def createLogger(name):
logging.basicConfig(
level=logging.INFO,
2025-05-31 23:50:43 +00:00
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
handlers=[logging.FileHandler("app.log"), logging.StreamHandler()],
2025-05-12 01:01:19 +01:00
)
return logging.getLogger(name)