Skip to content

Ensure log file path is configured before logging errors#109

Merged
thatarchguy merged 1 commit intodevelopmentfrom
logging-function
Apr 3, 2016
Merged

Ensure log file path is configured before logging errors#109
thatarchguy merged 1 commit intodevelopmentfrom
logging-function

Conversation

@mprahl
Copy link
Member

@mprahl mprahl commented Apr 2, 2016

  • Now checks if the log file path is defined before writing errors to
    the log file
  • Moves the log file outside of the Blueprint and into postmaster.utils for best practice

* Now checks if the log file path is defined before writing errors to
the log file
* Moves the log file outside of the Blueprint and into postmaster.utils
@mprahl mprahl added this to the v1.0.1.0 milestone Apr 2, 2016
user. It then appends it with an ISO 8601 UTC timestamp to a JSON formatted log file
"""
log_path = models.Configs.query.filter_by(setting='Log File').first().value
if log_path and ((category == 'error') or
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if statement is what fixed the potential issue.

@thatarchguy thatarchguy merged commit d7839ca into development Apr 3, 2016
@thatarchguy thatarchguy deleted the logging-function branch April 3, 2016 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants