forked from pulp/pulp
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CDS is now able to use a loging config file, similar to pulp server
- Loading branch information
1 parent
f9d840e
commit 438e944
Showing
4 changed files
with
102 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Refer to python docs for information on format of this file | ||
# http://docs.python.org/library/logging.config.html#configuration-file-format | ||
# | ||
# Quick Summary: | ||
# To change logging options. | ||
# Look for 'qualname' in a logger_* section | ||
# 'qualname' represents the module name in the python file | ||
# Example: pulp.server.api.repo_sync would be controlled by | ||
# qualname: pulp.server.api.repo_sync | ||
# as well as 'qualname: pulp.server.api' | ||
# | ||
# If you want to add a new section | ||
# 1) Add an entry to 'keys' under [loggers] for MODULENAME | ||
# 2) Add a new [logger_MODULENAME] | ||
# 3) Add a 'propagate: 0' to [logger_MODULENAME] | ||
# This will ensure the log messages are handled as you want | ||
# and don't reach any higher up loggers | ||
# | ||
# Note: | ||
# Python 2.4 has an issue with spaces between commas | ||
[loggers] | ||
keys: root,pulp,gofer,grinder,qpid | ||
|
||
[logger_root] | ||
# NOTSET for 'root' means it will allow | ||
# any log statements that reach here to be displayed | ||
level: NOTSET | ||
handlers: pulp_file,console | ||
|
||
[logger_pulp] | ||
level: INFO | ||
qualname: pulp | ||
# Propagate 0 stops messages for this logger from being | ||
# logged a another time by a higher logger in the hierachy | ||
# i.e. 'propagate 0' stops these messages from being logged multiple times | ||
propagate: 0 | ||
handlers: pulp_file,console | ||
|
||
[logger_gofer] | ||
level: INFO | ||
propagate: 0 | ||
qualname: gofer | ||
handlers: pulp_file | ||
|
||
[logger_qpid] | ||
level: INFO | ||
propagate: 0 | ||
qualname: qpid | ||
handlers: pulp_file | ||
|
||
[logger_grinder] | ||
level: INFO | ||
propagate: 0 | ||
qualname: grinder | ||
handlers: grinder_file | ||
|
||
[formatters] | ||
keys: detailed,simple | ||
|
||
[formatter_simple] | ||
format: %(asctime)s %(name)s:%(levelname)s: %(message)s | ||
|
||
[formatter_detailed] | ||
# Note: (funcName)s is not present in Python 2.4 | ||
# format: %(asctime)s %(process)d:%(thread)d: %(name)s:%(levelname)s: %(module)s:%(funcName)s:%(lineno)d %(message)s | ||
format: %(asctime)s %(process)d:%(thread)d: %(name)s:%(levelname)s: %(module)s:%(lineno)d %(message)s | ||
|
||
[handlers] | ||
# No spaces, python 2.4 has an issue if you have spaces | ||
keys: console,pulp_file,grinder_file | ||
|
||
[handler_console] | ||
level: ERROR | ||
class: StreamHandler | ||
args: [] | ||
formatter: simple | ||
|
||
[handler_pulp_file] | ||
level: DEBUG | ||
class: handlers.RotatingFileHandler | ||
args: ['/var/log/pulp-cds/pulp.log', 'a', 10000000, 3] | ||
formatter: detailed | ||
|
||
[handler_grinder_file] | ||
level: DEBUG | ||
class: handlers.RotatingFileHandler | ||
args: ['/var/log/pulp-cds/grinder.log', 'a', 10000000, 3] | ||
formatter: detailed | ||
|
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