-
Notifications
You must be signed in to change notification settings - Fork 25
Add Log class and logging config #184
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c736b77
Add Log class and logging config
allenrobel f57e258
Remove unused inspect import
allenrobel 080f4b3
Replace valid_handlers set with ValidLogHandlers enum
allenrobel 12bb032
Remove module docstring to resolve sanity error
allenrobel 7c083c7
Test fix for Ansible sanity from __future__ import error
allenrobel 2a20dfe
Remove annotations from import __future__
allenrobel 2ae92aa
Move log.py to common/ and add setup_logging() helper
allenrobel 85ebd61
Fix handler validation to check class property instead of key name
allenrobel 9e1e155
Add tests/sanity/config.yml
allenrobel b4544be
Move config.yml under tests/
allenrobel 425461d
Apply suggestion from @lhercot
mikewiebe 340207f
Apply suggestions from code review
mikewiebe 86a567a
Replace “dcnm” with “nd” everrywhere
allenrobel fd1f715
Replace “dcnm” with “nd” everrywhere
allenrobel 4624a08
Add config and develop params to Log.__init__()
allenrobel 9577c11
Reformat test_log.py docstrings to project standards
allenrobel 87bab16
Address unit test coverage gaps in test_log.py
allenrobel 045f498
Add develop param to setup_logging() and update Log docstring
allenrobel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| { | ||
| "version": 1, | ||
| "formatters": { | ||
| "standard": { | ||
| "class": "logging.Formatter", | ||
| "format": "%(asctime)s - %(levelname)s - [%(name)s.%(funcName)s.%(lineno)d] %(message)s" | ||
| } | ||
| }, | ||
| "handlers": { | ||
| "file": { | ||
| "class": "logging.handlers.RotatingFileHandler", | ||
| "formatter": "standard", | ||
| "level": "DEBUG", | ||
| "filename": "/tmp/nd.log", | ||
| "mode": "a", | ||
| "encoding": "utf-8", | ||
| "maxBytes": 50000000, | ||
| "backupCount": 4 | ||
| } | ||
| }, | ||
| "loggers": { | ||
| "nd": { | ||
| "handlers": [ | ||
| "file" | ||
| ], | ||
| "level": "DEBUG", | ||
| "propagate": false | ||
| } | ||
| }, | ||
| "root": { | ||
| "level": "INFO", | ||
| "handlers": [ | ||
| "file" | ||
| ] | ||
| } | ||
| } | ||
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| modules: | ||
| # Limit Python version to control node Python versions | ||
| python_requires: controller |
Empty file.
Empty file.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.