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

Stdlib 'wrapping' doesn't pass positional args to the stdlib logger #19

Closed
gcbirzan opened this Issue Dec 1, 2013 · 0 comments

Comments

Projects
None yet
2 participants
@gcbirzan
Contributor

gcbirzan commented Dec 1, 2013

This is used (by us, anyway), extensively, because we just like pain. But, even so, it should be supported.

gcbirzan added a commit to gcbirzan/structlog that referenced this issue Dec 1, 2013

gcbirzan added a commit to gcbirzan/structlog that referenced this issue Dec 16, 2013

gcbirzan added a commit to gcbirzan/structlog that referenced this issue Jun 11, 2014

gcbirzan added a commit to gcbirzan/structlog that referenced this issue Jun 14, 2014

emfree added a commit to nylas/sync-engine that referenced this issue Jul 14, 2014

Adapt logging setup to work when the API server is run under gunicorn.
Summary:
Run with:
  gunicorn --worker-class inbox.api.wsgi.InboxWSGIWorker --logger-class inbox.api.wsgi.GunicornLogger inbox.api.srv:app ...

This also requires some minor changes to our existing logging setup, because
gunicorn passes positional arguments in its logging messages
(`self.log.info('message %s', some_value)`) but structlog can't currently
handle that (hynek/structlog#19).

Test Plan:
Run `bin/inbox-api` and `gunicorn --worker-class
inbox.api.wsgi.InboxWSGIWorker --logger-class inbox.api.wsgi.GunicornLogger
--workers=1 --bind 127.0.0.1:5555 inbox.api.srv:app` and make some API
requests.

Reviewers: spang

Reviewed By: spang

Differential Revision: https://review.inboxapp.com/D235

emfree added a commit to nylas/sync-engine that referenced this issue Jul 14, 2014

Adapt logging setup to work when the API server is run under gunicorn.
Summary:
Run with:
  gunicorn --worker-class inbox.api.wsgi.InboxWSGIWorker --logger-class inbox.api.wsgi.GunicornLogger inbox.api.srv:app ...

This also requires some minor changes to our existing logging setup, because
gunicorn passes positional arguments in its logging messages
(`self.log.info('message %s', some_value)`) but structlog can't currently
handle that (hynek/structlog#19).

Test Plan:
Run `bin/inbox-api` and `gunicorn --worker-class
inbox.api.wsgi.InboxWSGIWorker --logger-class inbox.api.wsgi.GunicornLogger
--workers=1 --bind 127.0.0.1:5555 inbox.api.srv:app` and make some API
requests.

Reviewers: spang

Reviewed By: spang

Differential Revision: https://review.inboxapp.com/D235

@hynek hynek added the stdlib label Oct 28, 2014

lakshmi-kannan added a commit to lakshmi-kannan/structlog that referenced this issue Nov 6, 2014

lakshmi-kannan added a commit to lakshmi-kannan/structlog that referenced this issue Nov 6, 2014

@hynek hynek closed this in 438fce3 Jan 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment