logging enabled/disabled thru config
This commit is contained in:
@@ -28,6 +28,8 @@ import iso8601
|
||||
from iso8601 import ParseError
|
||||
import arrow
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
lbstoN = 4.44822
|
||||
|
||||
landingpages = (
|
||||
@@ -120,6 +122,11 @@ info_calls = [
|
||||
|
||||
|
||||
def dologging(filename, s):
|
||||
do_logging = settings.MYLOGGING.get(filename,True)
|
||||
|
||||
if not do_logging:
|
||||
return
|
||||
|
||||
tstamp = time.localtime()
|
||||
timestamp = time.strftime('%b-%d-%Y %H:%M:%S', tstamp)
|
||||
with open(filename, 'a') as f:
|
||||
|
||||
Reference in New Issue
Block a user