-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support Dictionary Config setting. #1602
Changes from all commits
e6de1a0
9d7c857
c5ae962
a7d4491
783c9be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1309,6 +1309,24 @@ class LogConfig(Setting): | |
""" | ||
|
||
|
||
class LogConfigDict(Setting): | ||
name = "logconfig_dict" | ||
section = "Logging" | ||
cli = ["--log-config-dict"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't seem to work, as there doesn't seem to be any conversion from the string supplied by the shell in some
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, maybe Also https://stackoverflow.com/a/18609361/452210 re There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can extend our config we're passing via There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe you could convert your PR comment into a new issue along the lines of advertised CLI option There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @javabrett Done: #1909 |
||
validator = validate_dict | ||
default = {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might be a little bit misleading since we use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should set the default as Maybe it doesn't matter much either way. |
||
desc = """\ | ||
The log config dictionary to use, using the standard Python | ||
logging module's dictionary configuration format. This option | ||
takes precedence over the :ref:`logconfig` option, which uses the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a minor issue, but I'd say let's deprecate There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you can explain a bit more, I will do a PR. Or I will review a PR. Thanks! |
||
older file configuration format. | ||
|
||
Format: https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig | ||
|
||
.. versionadded:: 19.8 | ||
""" | ||
|
||
|
||
class SyslogTo(Setting): | ||
name = "syslog_addr" | ||
section = "Logging" | ||
|
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.
Do we need to add
cli = ["--log-config-dict"]
?