예제 #1
0
        log_id = property(_get_log_id, _set_log_id)


### LogNothing disabled logging completely


class LogNothing(Log):

    # Don't log anything
    ignore_level = SYSTEM_LOG_NOTHING

    def setup(self, *args, **kws):
        Log.setup(*args, **kws)
        self.ignore_level = SYSTEM_LOG_NOTHING

    def open(self, flags='a'):
        self.open_log_file = None

    def close(self):
        pass


###

# Create a main log object
if __debug__ and Tools.debugging():
    log = Log(SYSTEM_LOG_EVERYTHING)
else:
    log = Log(SYSTEM_INFO + 1)
예제 #2
0
        def _set_log_id(self, value):

            self._custom_log_id = value

        log_id = property(_get_log_id, _set_log_id)

### LogNothing disabled logging completely

class LogNothing(Log):

    # Don't log anything
    ignore_level = SYSTEM_LOG_NOTHING

    def setup(self, *args, **kws):
        Log.setup(*args, **kws)
        self.ignore_level = SYSTEM_LOG_NOTHING

    def open(self, flags='a'):
        self.open_log_file = None

    def close(self):
        pass
    
###

# Create a main log object
if __debug__ and Tools.debugging():
    log = Log(SYSTEM_LOG_EVERYTHING)
else:
    log = Log(SYSTEM_INFO + 1)