Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-357

Different appenders for a single class (logger) depending on the level

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 0.10.0
    • None
    • Configurator
    • None
    • Windows XP, Visual C++ 2008

    Description

      Hello,

      Sorry if my request is maybe more a question than a bug.
      I use a file as a configurator and I want to know if it's possible, (for example playing with the fact that all logs are sent to the root logger) to have in a same C++ class using a single logger, all logs sent to a rolling file (starting at the "TRACE" level) and only logs at the minimum of the WARN level, be sent to the Event Viewer ?

      I thought the example below would do so, but it doesn't work. TRACE logs are also sent to the Event Viewer :

      1. Set root logger level
        log4j.rootLogger=WARN, A1, Eventlog
        log4j.logger.CMainApplication=TRACE, Rollingfile
        log4j.logger.CLine=TRACE, Rollingfile
        log4j.logger.CLineFaceavant=TRACE, Rollingfile
        log4j.logger.CLineCeramiques=TRACE, Rollingfile

      If it's not clear enough, please let me know (ask for further detail if necessary)

      Thanks

      Raphaƫl

      Attachments

        Activity

          People

            carnold@apache.org Curt Arnold
            rg granjon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: