Uploaded image for project: 'Log4php'
  1. Log4php
  2. LOG4PHP-209

log4php hierarchical namespace loggers

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 2.3.0
    • None
    • Code
    • debian

    Description

      Logger hierarchy is denoted by dots, PHP hierarchy (namespaces) is denoted by backslashes. It would be very helpful to be able to configure loggers for namespaces. E.g. we have an email component with the someco\mail namespace. Now I want to configure the corresponding loggers. I'd be content with either <logger name="someco.mail"> or <logger name="someco\mail">.
      Right now I'm using a simple hack which replaces backslashes with dots in LoggerHierarchy::getLogger() which works like a charm but is probably not the correct way to fix this.

      So please allow to have PHP namespaces as logger hierarchy (which is log4j behavior, isn't it?). Maybe I'm simply missing something, but I cannot get it to work.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tcm Tim-Christian Mundt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: