def set(self, mode, disable):
        """ create logger object, enable or disable logging """
        global logger
        try:
            if logger:
                if disable:
                    logger.disabled = True
            else:
                if mode in ('STREAM', 'FILE'):
                    logger = logd.getLogger(mode, __version__)
        except Exception as e:
            logger.exception(
                '%s: Problem incurred during logging setup' % inspect.stack()[0][3]
                )
            return False
        return True
def set ( self , mode , disable ) : global logger try : if logger : if disable : logger . disabled = True else : if mode in ( 'STREAM' , 'FILE' ) : logger = logd . getLogger ( mode , __version__ ) except Exception as e : logger . exception ( '%s: Problem incurred during logging setup' % inspect . stack ( ) [ 0 ] [ 3 ] ) return False return True
create logger object, enable or disable logging