~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: John Arbash Meinel
  • Date: 2010-04-26 19:04:06 UTC
  • mto: This revision was merged to the branch mainline in revision 435.
  • Revision ID: john@arbash-meinel.com-20100426190406-psgsbys8e33cpcbg
Add 'http_log_level' and --log-level.

This allows us to set a default log level that isn't 'WARNING' the logger
default, and isn't DEBUG, the current code default.


Also add a time() check for serving a particular branch page.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        import sys
64
64
 
65
65
        logger = logging.getLogger('loggerhead')
 
66
        log_level = config.get_log_level()
 
67
        if log_level is not None:
 
68
            logger.setLevel(log_level)
66
69
        handler = logging.StreamHandler(sys.stderr)
67
70
        handler.setLevel(logging.DEBUG)
68
71
        logger.addHandler(handler)