Skip to content
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

Use mozlog for application logging #21

Merged
merged 3 commits into from
Jul 11, 2017

Conversation

mars-f
Copy link
Contributor

@mars-f mars-f commented Jul 4, 2017

Configure the application to use the mozlog structured log format for
application-level log messages (log messages from libraries and
frameworks still go through the Python Standard Library string logger).

To test, modify docker-compose.override.yml and set the LOG_LEVEL environment variable to the string value debug. A message about logging initialization should appear in the container logs.

Try setting the LOG_LEVEL value to foobar to see what happens if an unknown/typo'd log level is set.

@mars-f mars-f requested review from zalun and purelogiq July 4, 2017 19:42
Copy link
Contributor

@purelogiq purelogiq left a comment

Choose a reason for hiding this comment

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

Can you add a line demonstrating it's usage in one of the api methods?

Copy link
Contributor

@purelogiq purelogiq left a comment

Choose a reason for hiding this comment

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

Requires a rebase do the requirements.txt refactor.

Configure the application to use the mozlog structured log format for
 application-level log messages (log messages from libraries and
 frameworks still go through the Python Standard Library string logger).
Copy link
Contributor

@purelogiq purelogiq left a comment

Choose a reason for hiding this comment

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

1 nit which I don't mind fixing in another commit.

ldap_username,
'msg':
'received an empty response from the transplant service',
}, 'transplant.failure'
Copy link
Contributor

Choose a reason for hiding this comment

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

at the end of this line you can add a comment like: # yapf: disable to prevent the linter from formating this hash. I don't think this is good style just because the linter says so, it's clearly a bug and we know better :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do

@purelogiq purelogiq merged commit 13c8477 into mozilla-conduit:master Jul 11, 2017
@mars-f mars-f deleted the use-mozlog branch July 12, 2017 02:19
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.

3 participants