ImperialCollegeLondon / recode-perceptions

Convolutional Neural Networks exemplar for ReCoDE
https://imperialcollegelondon.github.io/recode-perceptions/
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

logging.py #15

Open emilymuller1991 opened 2 years ago

emilymuller1991 commented 2 years ago

configure logging into class where setFileHandler does not edit its input. does work but not optimal.

AdrianDAlessandro commented 2 years ago

Edit the Logger class to inherit from logging.Logger and then setFileHandler can be a method of that class, so it is fine to edit itself.

class Logger(logging.Logger):
    def __init__(self, name="testing"):
        super().__init__(name)
        self.logger.setLevel(logging.INFO)