Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 679 Bytes

tutorial_logging.rst

File metadata and controls

26 lines (17 loc) · 679 Bytes

Enable logging in your python code

The simplest way to enable logging in your code would be to add this in the beginning of your file:

import logging

logging.basicConfig(
    level=logging.INFO,
    format="%(levelname)s:%(name)s:%(message)s",
)

pyFirecREST has all of it's messages in INFO level. If you want to avoid messages from other packages, you can do the following:

import logging

logging.basicConfig(
    level=logging.WARNING,
    format="%(levelname)s:%(name)s:%(message)s",
)
logging.getLogger("firecrest").setLevel(logging.INFO)