-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Details: - Changed the logging so that it can now reasonably be used together with other projects that use logging. This is done by centralizing the log_init() function in the utils module, and by changing it such that the log level is alwqys set, but the file handler is set only when a log file is specified. As a result, the loggers now propagate to the Python root logger when the log_file parameter is not set. So playbooks using the zhmc modules have two choices: - Specify a log file via the log_file parameter - Do not specify a log file and configure the Python root logger as needed. - Added log_file support to all modules that did not have it yet. - Changed the format of log messages from: %(asctime)s %(name)s %(message)s with the default date format (e.g. 2019-02-20 10:54:26,123) To: %(asctime)s %(levelname)s %(name)s %(process)d %(message)s with the default date format (e.g. 2019-02-20 10:54:26,123) to be more in sync with common log formats. - Removed the unused log() function in the utils module because logging is now done directly to Python loggers. Signed-off-by: Andreas Maier <maiera@de.ibm.com>
- Loading branch information
1 parent
0945b0a
commit ad210b8
Showing
26 changed files
with
438 additions
and
173 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.