mirror of
https://github.com/dongdongunique/EvoSynth.git
synced 2026-02-13 01:32:46 +00:00
12 lines
321 B
Python
12 lines
321 B
Python
def setup_logging(log_file='toolbox.log', level='DEBUG'):
|
|
import logging
|
|
|
|
logging.basicConfig(
|
|
filename=log_file,
|
|
level=getattr(logging, level),
|
|
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
|
)
|
|
|
|
def get_logger(name):
|
|
import logging
|
|
return logging.getLogger(name) |