File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 40
40
from onadata .libs .utils .common_tools import report_exception
41
41
from onadata .libs .utils .email import get_account_lockout_email_data
42
42
43
- logger = logging .getLogger ("console_logger" )
44
- logger .addHandler (logging .StreamHandler () )
43
+ logger = logging .getLogger (__name__ )
44
+ logger .addHandler (logging .FileHandler )
45
45
logger .setLevel (logging .DEBUG )
46
46
47
47
ENKETO_AUTH_COOKIE = getattr (settings , "ENKETO_AUTH_COOKIE" , "__enketo" )
Original file line number Diff line number Diff line change @@ -407,6 +407,14 @@ def skip_suspicious_operations(record):
407
407
"formatter" : "verbose" ,
408
408
"model" : "onadata.apps.main.models.audit.AuditLog" ,
409
409
},
410
+ "file" : {
411
+ "class" : "logging.handlers.RotatingFileHandler" ,
412
+ "filename" : "auth_debug.log" ,
413
+ "backupCount" : 10 ,
414
+ "maxBytes" : 1000000 , # 1MB
415
+ "formatter" : "profiler" ,
416
+ "level" : "DEBUG" ,
417
+ }
410
418
# 'sql_handler': {
411
419
# 'level': 'DEBUG',
412
420
# 'class': 'logging.StreamHandler',
@@ -421,6 +429,11 @@ def skip_suspicious_operations(record):
421
429
# }
422
430
},
423
431
"loggers" : {
432
+ "onadata.libs.authentication" : {
433
+ "handlers" : ["file" ],
434
+ "level" : "DEBUG" ,
435
+ "propagate" : True ,
436
+ },
424
437
"django.request" : {
425
438
"handlers" : ["mail_admins" , "console" ],
426
439
"level" : "DEBUG" ,
You can’t perform that action at this time.
0 commit comments