-
Notifications
You must be signed in to change notification settings - Fork 1
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
Library set up #1
Conversation
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.
I was able to pull this branch, install, and log in JSON format:
{"levelname": "WARNING", "asctime": "2020-10-07 23:20:04,178", "module": "log", "process": 85556, "thread": 4395158976, "message": "Not Found: /api/v1/projects/3417/", "status_code": 404, "request": "<WSGIRequest: PATCH '/api/v1/projects/3417/'>", "severity": "WARNING"}
Just needs to be repackaged under pysdl
instead of pydsl
(assuming it stands for StackDriver Logging), but LGTM.
README.md
Outdated
settings.py -> | ||
|
||
```python | ||
from pydsl.logger_config import logging_dict |
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 pysdl
instead of pydsl
, and likewise with line 17
from logging.config import dictConfig | ||
from pydsl.logger_config import logging_dict | ||
dictConfig(logging_dict) | ||
``` |
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.
Add an example to actually write something to logs? I used the snippet below:
log = logging.getLogger("testfile")
log.info("hello world")
@thequinto Should be fixed now. Thanks for reviewing! |
Set ups the library pysdl to be pulled into other projects and automatically configure and fix python-json-logger to be correctly consumed by stack driver logging.