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

[Backport master] Fix setup logging #2573

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions c2cwsgiutils/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ def __repr__(self) -> str:

def setup_logging(self, defaults: Optional[dict[str, str]] = None) -> None:
"""
Set up logging via :func:`logging.config.fileConfig`.
Set up logging via :func:`logging.config.dictConfig` with value returned from c2cwsgiutils.get_logconfig_dict.

Defaults are specified for the special ``__file__`` and ``here``
variables, similar to PasteDeploy config loading. Extra defaults can
optionally be specified as a dict in ``defaults``.

Arguments:
defaults: The defaults that will be used when passed to
:func:`logging.config.fileConfig`.
---------
defaults: The defaults that will be used when passed to
:func:`logging.config.fileConfig`.

"""
if "loggers" in self.get_sections():
Expand Down
Loading