Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add file logging too

  • Loading branch information...
commit 4320a60e5898adc3b2d5ad5dc938de840cf79fe3 1 parent effa8c8
@jcarbaugh jcarbaugh authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 wsgiapp.py
View
6 wsgiapp.py
@@ -4,6 +4,7 @@
if not settings.DEBUG:
import logging
+
from logging.handlers import SMTPHandler
mail_handler = SMTPHandler(settings.SMTP_HOST,
'geocron.us@gmail.com',
@@ -12,6 +13,11 @@
(settings.SMTP_USER, settings.SMTP_PASSWORD))
mail_handler.setLevel(logging.ERROR)
application.logger.addHandler(mail_handler)
+
+ from logging.handlers import FileHandler
+ file_handler = FileHandler("/tmp/geocron.log")
+ file_handler.setLevel(logging.WARNING)
+ application.logger.addHandler(file_handler)
applications = {
'/': application,
Please sign in to comment.
Something went wrong with that request. Please try again.