Skip to content

Commit

Permalink
Merge pull request #4798 from benjaoming/log-format-0.16.x
Browse files Browse the repository at this point in the history
Add date and time to log messages
  • Loading branch information
MCGallaspy committed Feb 1, 2016
2 parents 11d765a + 06303dd commit b601e12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kalite/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@
LOGGING_LEVEL = getattr(local_settings, "LOGGING_LEVEL", logging.INFO)
LOG = getattr(local_settings, "LOG", logging.getLogger("kalite"))

logging.basicConfig()
LOG.setLevel(LOGGING_LEVEL)
ch = logging.StreamHandler()
formatter = logging.Formatter('%(asctime)s - %(levelname)s:%(name)s: %(message)s')
ch.setFormatter(formatter)
LOG.addHandler(ch)

logging.getLogger("requests").setLevel(logging.WARNING) # shut up requests!

Expand Down

0 comments on commit b601e12

Please sign in to comment.