def __init__(self, *args, **kwargs): StderrHandler.__init__(self, *args, **kwargs) # Try import colorama so that we work on Windows. colorama.init is a # noop on other operating systems. try: import colorama except ImportError: pass else: colorama.init()
def main(mountpoint, root, debug, fuse_debug): if fuse_debug: redirect_logging() # setup logging StderrHandler(level=DEBUG if debug else INFO).push_application() log.info('mounting index of {} onto {}'.format(root, mountpoint)) try: repo = Repo(root) except NotGitRepository: log.info('Error: {} is not a git repository'.format(root)) sys.exit(1) fuse.FUSE(IndexFS(root, repo, mountpoint), mountpoint, foreground=False)
MonitoringFileHandler, StderrHandler, RotatingFileHandler, \ TimedRotatingFileHandler, TestHandler, MailHandler, GMailHandler, SyslogHandler, \ NullHandler, NTEventLogHandler, create_syshandler, StringFormatter, \ StringFormatterHandlerMixin, HashingHandlerMixin, \ LimitingHandlerMixin, WrapperHandler, FingersCrossedHandler, \ GroupHandler __version__ = '0.7.1-dev' # create an anonymous default logger and provide all important # methods of that logger as global functions _default_logger = Logger('Generic') _default_logger.suppress_dispatcher = True debug = _default_logger.debug info = _default_logger.info warn = _default_logger.warn warning = _default_logger.warning notice = _default_logger.notice error = _default_logger.error exception = _default_logger.exception catch_exceptions = _default_logger.catch_exceptions critical = _default_logger.critical exception = _default_logger.exception catch_exceptions = _default_logger.catch_exceptions log = _default_logger.log del _default_logger # install a default global handler default_handler = StderrHandler() default_handler.push_application()
MonitoringFileHandler, StderrHandler, RotatingFileHandler, \ TimedRotatingFileHandler, TestHandler, MailHandler, GMailHandler, SyslogHandler, \ NullHandler, NTEventLogHandler, create_syshandler, StringFormatter, \ StringFormatterHandlerMixin, HashingHandlerMixin, \ LimitingHandlerMixin, WrapperHandler, FingersCrossedHandler, \ GroupHandler __version__ = '0.9.2-dev' # create an anonymous default logger and provide all important # methods of that logger as global functions _default_logger = Logger('Generic') _default_logger.suppress_dispatcher = True debug = _default_logger.debug info = _default_logger.info warn = _default_logger.warn warning = _default_logger.warning notice = _default_logger.notice error = _default_logger.error exception = _default_logger.exception catch_exceptions = _default_logger.catch_exceptions critical = _default_logger.critical log = _default_logger.log del _default_logger # install a default global handler if os.environ.get('LOGBOOK_INSTALL_DEFAULT_HANDLER'): default_handler = StderrHandler() default_handler.push_application()