modules/LogHandlers.py
def emit(self, record):
        ''' Takes the logger record and does something with it

        In this case it will first print it to stdout if the level is below
        ERROR or stderr for ERROR and above.
        '''

        # This checks for level equal or above ERROR and prints to stderr,
        # stdout otherwise
        header = self.create_general_header(record.levelno, record)

        for line in format_message(record).splitlines():
            print(header, line, file=sys.stdout, flush=True)

        # This checks for exception, always print to stderr
        if record.exc_info:
            header = self.create_general_header(EXC_LEVEL, record)
            if isinstance(record.exc_info, list):
                lines = record.exc_info
            else:
                lines = "".join(traceback.format_exception(*record.exc_info)).splitlines()

            for line in lines:
                print(header, line, file=sys.stdout, flush=True)
 Takes the logger record and does something with it

        In this case it will first print it to stdout if the level is below
        ERROR or stderr for ERROR and above.
        
Takes the logger record and does something with it
In this case it will first print it to stdout if the level is below
ERROR or stderr for ERROR and above.
Takes the logger record and does something with it In this case it will first print it to stdout if the level is below ERROR or stderr for ERROR and above .
def emit(self, record):
        header = self.create_general_header(record.levelno, record)
        for line in format_message(record).splitlines():
            print(header, line, file=sys.stdout, flush=True)
        if record.exc_info:
            header = self.create_general_header(EXC_LEVEL, record)
            if isinstance(record.exc_info, list):
                lines = record.exc_info
            else:
                lines = "".join(traceback.format_exception(*record.exc_info)).splitlines()
            for line in lines:
                print(header, line, file=sys.stdout, flush=True)
def emit ( self , record ) : header = self . create_general_header ( record . levelno , record ) for line in format_message ( record ) . splitlines ( ) : print ( header , line , file = sys . stdout , flush = True ) if record . exc_info : header = self . create_general_header ( EXC_LEVEL , record ) if isinstance ( record . exc_info , list ) : lines = record . exc_info else : lines = "" . join ( traceback . format_exception ( * record . exc_info ) ) . splitlines ( ) for line in lines : print ( header , line , file = sys . stdout , flush = True )
Takes the logger record and does something with it
In this case it will first print it to stdout if the level is below
ERROR or stderr for ERROR and above.
Takes the logger record and does something with it In this case it will first print it to stdout if the level is below ERROR or stderr for ERROR and above .
''' Takes the logger record and does something with it

        In this case it will first print it to stdout if the level is below
        ERROR or stderr for ERROR and above.
        ''' # This checks for level equal or above ERROR and prints to stderr, # stdout otherwise # This checks for exception, always print to stderr
self
record