Skip to content

Allow ',<whitespace>' delimiters in logging.config.fileConfig() #47976

Closed

Description

@wcmaier
mannequin
BPO 3726
Nosy @vsajip
Files
  • logging.diff
  • 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 = 'https://github.com/vsajip'
    closed_at = <Date 2008-09-03.09:21:01.721>
    created_at = <Date 2008-08-29.13:44:43.258>
    labels = ['type-bug', 'library']
    title = "Allow ',<whitespace>' delimiters in logging.config.fileConfig()"
    updated_at = <Date 2019-07-20.16:43:08.220>
    user = 'https://bugs.python.org/wcmaier'

    bugs.python.org fields:

    activity = <Date 2019-07-20.16:43:08.220>
    actor = 'terry.reedy'
    assignee = 'vinay.sajip'
    closed = True
    closed_date = <Date 2008-09-03.09:21:01.721>
    closer = 'vinay.sajip'
    components = ['Library (Lib)']
    creation = <Date 2008-08-29.13:44:43.258>
    creator = 'wcmaier'
    dependencies = []
    files = ['11304']
    hgrepos = []
    issue_num = 3726
    keywords = ['patch']
    message_count = 2.0
    messages = ['72134', '72381']
    nosy_count = 2.0
    nosy_names = ['vinay.sajip', 'wcmaier']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue3726'
    versions = ['Python 2.6']

    Activity

    1. wcmaier commented on Aug 29, 2008

      wcmaiermannequin
      MannequinAuthor

      Currently, logging.config.fileConfig() inconsistently handles lines like:

      [handlers]
      keys = spam, eggs

      [formatters]
      keys = foo, bar

      It does, however, correctly handle the ', ' delimiter in the [loggers]
      section. This is because the various _install_*() functions in
      logging.config aren't consistent about whether (and when) or not they
      strip whitespace when generating key names.

      Though the stdlib documentation only includes examples in the [handlers]
      and [formatters] section with ',' delimiters, it seems reasonable to
      expect that logging.config.fileConfig() should handle ', '. The attached
      test demonstrates the failure and suggests a solution.

      Thanks!
      whitespace

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Aug 29, 2008
    3. self-assigned this
      on Sep 1, 2008
    4. vsajip commented on Sep 3, 2008

      @vsajip
      Member

      Fix checked into trunk (slightly modified version of patch).

    5. 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

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions