-
Notifications
You must be signed in to change notification settings - Fork 31
Structlog Logging to Database #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
conditional/blueprints/attendance.py
Outdated
logger.info('backend', | ||
action=("gave attendance to freshman-%s for %s" % (f, committee)) | ||
) | ||
logger.info('Gave Attendance to freshman-{} for {}'.format(f, committee)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ‘log’ not ‘logger’.
conditional/blueprints/attendance.py
Outdated
logger.info('backend', | ||
action=("gave attendance to %s for %s" % (m, seminar_name)) | ||
) | ||
logger.info('Gave Attendance to {} for {}'.format(m, seminar_name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
conditional/blueprints/attendance.py
Outdated
logger.info('backend', | ||
action=("gave attendance to freshman-%s for %s" % (f, seminar_name)) | ||
) | ||
logger.info('Gave Attendance to freshman-{} for {}'.format(f, seminar_name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
conditional/blueprints/attendance.py
Outdated
"gave %s to %s for %s house meeting" % ( | ||
m['status'], m['uid'], timestamp.strftime("%Y-%m-%d"))) | ||
) | ||
logger.info('Marked {} {} for House Meeting on {}'.format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
conditional/blueprints/attendance.py
Outdated
action=("gave %s to freshman-%s for %s house meeting" % ( | ||
f['status'], f['id'], timestamp.strftime("%Y-%m-%d"))) | ||
) | ||
logger.info('Marked freshman-{} {} for House Meeting on {}'.format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 thanks for generalizing this BTW into structlog extensions, it should be super useful for future projects.
Added processors for structlog that grab the Flask request object and then log any modifications made to the database.
Fixes #142