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

Library set up #1

Merged
merged 3 commits into from
Oct 20, 2020
Merged

Library set up #1

merged 3 commits into from
Oct 20, 2020

Conversation

ajabdelaziz
Copy link
Collaborator

@ajabdelaziz ajabdelaziz commented Oct 6, 2020

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.

@ajabdelaziz ajabdelaziz requested review from kristophM and thequinto and removed request for kristophM and thequinto October 6, 2020 15:09
Copy link
Collaborator

@thequinto thequinto left a 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
Copy link
Collaborator

@thequinto thequinto Oct 7, 2020

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)
```
Copy link
Collaborator

@thequinto thequinto Oct 7, 2020

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")

@ajabdelaziz
Copy link
Collaborator Author

@thequinto Should be fixed now. Thanks for reviewing!

@kristophM kristophM merged commit 5d6b142 into master Oct 20, 2020
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