~ubuntu-branches/ubuntu/oneiric/loggerhead/oneiric

« back to all changes in this revision

Viewing changes to loggerhead/main.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij, Max Bowsher
  • Date: 2010-12-18 14:43:23 UTC
  • mfrom: (4.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20101218144323-crnmzzz80vi8enlk
Tags: 1.18-1
[ Max Bowsher ]
* New upstream release.
 + Depends on bzr >= 1.17. Closes: #605653
* Remove remnants of patching to use the system YUI, which actually broke
  the use of YUI entirely. Loggerhead requires YUI 3, which is
  not packaged yet. Until it is, include YUI.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 
59
59
def setup_logging(config):
60
60
    logging.basicConfig()
61
 
    log_level = config.get_log_level()
62
 
    logging.getLogger('').setLevel(log_level)
 
61
    logging.getLogger('').setLevel(logging.DEBUG)
63
62
    logger = logging.getLogger('loggerhead')
64
 
    logger.setLevel(log_level)
65
63
    if config.get_option('log_folder'):
66
64
        logfile_path = os.path.join(
67
65
            config.get_option('log_folder'), 'serve-branches.log')
73
71
    logfile.setFormatter(formatter)
74
72
    logfile.setLevel(logging.DEBUG)
75
73
    logger.addHandler(logfile)
76
 
    def _restrict_logging(logger_name):
77
 
        logger = logging.getLogger(logger_name)
78
 
        if logger.getEffectiveLevel() < logging.INFO:
79
 
            logger.setLevel(logging.INFO)
80
 
    # simpleTAL is *very* verbose in DEBUG mode, which is otherwise the
81
 
    # default. So quiet it up a bit.
82
 
    _restrict_logging('simpleTAL')
83
 
    _restrict_logging('simpleTALES')
84
74
    return logger
85
75
 
86
76