Skip to content
Snippets Groups Projects
Commit 1cbbdf26 authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

adding ActivateLogging

parent 62f91a4c
Branches
Tags
No related merge requests found
import logging
# create console handler with a higher log level
ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
logger=logging.getLogger("nomadcore")
logger.setLevel(logging.DEBUG)
logger.addHandler(ch)
logger2=logging.getLogger("nomad")
logger2.setLevel(logging.DEBUG)
logger2.addHandler(ch)
def debugToFile():
"makes a full log to a file named detailed.log"
fh = logging.FileHandler('detailed.log')
fh.setLevel(logging.DEBUG)
logger.addHandler(fh)
logger2.addHandler(fh)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment