Skip to content

Commit

Permalink
Add level name to log output
Browse files Browse the repository at this point in the history
  • Loading branch information
tfarago committed Oct 29, 2013
1 parent ebfd8e4 commit 3878f7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/concert
Expand Up @@ -327,7 +327,7 @@ class StartCommand(Command):
handler = logging.StreamHandler(sys.stderr)

handler.setLevel(logging.DEBUG)
logformat = '[%(asctime)s] %(name)s: {}: %(message)s'
logformat = '[%(asctime)s] %(levelname)s: %(name)s: {}: %(message)s'
formatter = logging.Formatter(logformat.format(session))
handler.setFormatter(formatter)

Expand Down
3 changes: 2 additions & 1 deletion concert/experiments/base.py
Expand Up @@ -80,7 +80,8 @@ def _create_stream_handler(self):
if self.has_multiple_folders or self.file_stream is None:
self.file_stream = FileHandler(path)
self.file_stream.setLevel(logging.INFO)
formatter = Formatter("[%(asctime)s] %(message)s")
formatter = Formatter("[%(asctime)s] %(levelname)s: " +
"%(name)s: %(message)s")
self.file_stream.setFormatter(formatter)
root_logger.addHandler(self.file_stream)

Expand Down

0 comments on commit 3878f7a

Please sign in to comment.