Skip to content

disable_existing_loggers does not apply to the root logger #79903

Closed

Description

@maggyero
mannequin
BPO 35722
Nosy @vsajip, @ezio-melotti, @merwok, @willingc, @JulienPalard, @maggyero
PRs
  • bpo-35722: Specify in the docs that disable_existing_loggers does not affect the root logger #11525
  • [3.7] bpo-35722: Updated the documentation for the 'disable_existing_loggers' parameter (GH-11525) #11655
  • [3.6] bpo-35722: Updated the documentation for the 'disable_existing_loggers' parameter (GH-11525) #11656
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-01-23.07:24:42.282>
    created_at = <Date 2019-01-11.19:32:29.879>
    labels = ['3.8', 'type-bug', '3.7', 'docs']
    title = 'disable_existing_loggers does not apply to the root logger'
    updated_at = <Date 2019-01-23.07:24:42.281>
    user = 'https://github.com/maggyero'

    bugs.python.org fields:

    activity = <Date 2019-01-23.07:24:42.281>
    actor = 'vinay.sajip'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2019-01-23.07:24:42.282>
    closer = 'vinay.sajip'
    components = ['Documentation']
    creation = <Date 2019-01-11.19:32:29.879>
    creator = 'maggyero'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35722
    keywords = ['patch', 'patch', 'patch', 'patch', 'patch']
    message_count = 3.0
    messages = ['333502', '334250', '334251']
    nosy_count = 7.0
    nosy_names = ['vinay.sajip', 'ezio.melotti', 'eric.araujo', 'docs@python', 'willingc', 'mdk', 'maggyero']
    pr_nums = ['11525', '11655', '11656']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue35722'
    versions = ['Python 3.7', 'Python 3.8']

    Activity

    1. maggyero commented on Jan 11, 2019

      maggyeromannequin
      MannequinAuthor

      In the logging package, the parameter disable_existing_loggers used in logging.config.dictConfig and logging.config.fileConfig does not apply to the root logger. More precisely, its disabled attribute remains unchanged (while it is set to True for non-root loggers). So it is either a bug or the documentation should be updated.

      Illustration:

      import logging.config

      assert logging.getLogger().disabled is False
      assert logging.getLogger("foo").disabled is False

      logging.config.dictConfig({"version": 1})

      assert logging.getLogger().disabled is False
      assert logging.getLogger("foo").disabled is True

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Jan 11, 2019
    3. added
      docsDocumentation in the Doc dir
      and removed
      stdlibStandard Library Python modules in the Lib/ directory
      on Jan 20, 2019
    4. vsajip commented on Jan 23, 2019

      @vsajip
      Member

      New changeset f0c7436 by Vinay Sajip (Géry Ogam) in branch 'master':
      bpo-35722: Updated the documentation for the 'disable_existing_loggers' parameter (GH-11525)
      f0c7436

    5. vsajip commented on Jan 23, 2019

      @vsajip
      Member

      New changeset 552478b by Vinay Sajip (Miss Islington (bot)) in branch '3.7':
      bpo-35722: Updated the documentation for the 'disable_existing_loggers' parameter (GH-11525) (GH-11655)
      552478b

    6. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of life3.8 (EOL)end of lifedocsDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions