logging enabled/disabled thru config
This commit is contained in:
@@ -3120,9 +3120,7 @@ def df_from_summary(data):
|
||||
@app.task
|
||||
def handle_c2_async_workout(alldata, userid, c2token, c2id, delaysec, defaulttimezone, debug=False, **kwargs):
|
||||
time.sleep(delaysec)
|
||||
with open("c2_auto_import.log", "a") as errorlog:
|
||||
timestr = time.strftime("%Y%m%d-%H%M%S")
|
||||
errorlog.write(timestr+' '+str(c2id)+' for userid '+str(userid)+'\r\n')
|
||||
dologging('c2_import.log',str(c2id)+' for userid '+str(userid))
|
||||
data = alldata[c2id]
|
||||
splitdata = None
|
||||
|
||||
@@ -3146,8 +3144,8 @@ def handle_c2_async_workout(alldata, userid, c2token, c2id, delaysec, defaulttim
|
||||
has_strokedata = True
|
||||
|
||||
s = 'User {userid}, C2 ID {c2id}'.format(userid=userid, c2id=c2id)
|
||||
dologging('debuglog.log', s)
|
||||
dologging('debuglog.log', json.dumps(data))
|
||||
dologging('c2_import.log', s)
|
||||
dologging('c2_import.log', json.dumps(data))
|
||||
|
||||
try:
|
||||
title = data['name']
|
||||
|
||||
Reference in New Issue
Block a user