Skip to content

Commit

Permalink
增加logmodule名字
Browse files Browse the repository at this point in the history
  • Loading branch information
firefoxbug committed Jun 5, 2014
1 parent 82ff50f commit 77c12a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/OcdnLogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
logging.CRITICAL
"""

def init_logger(logfile='test.log', stdout=True):
def init_logger(logfile='test.log', logmodule='OpenCDN', stdout=True):
formatter = logging.Formatter('%(levelname)s [%(asctime)s] %(name)s:%(pathname)s line=%(lineno)d [message="%(message)s"]')

logger = logging.getLogger('OpenCDN')
logger = logging.getLogger(logmodule)
logger.setLevel(logging.INFO)

# write log into file
Expand Down

0 comments on commit 77c12a9

Please sign in to comment.