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

Add ability to compile out loggging by logging level

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0
    • 0.11.0
    • Build
    • None
    • All, but particularly important when moving to environments like Windows CE

    Description

      You might want to consider the ability to use preprocessor defines to completely disable some of the logging functionality. Space and processor time can be tight on a small device and having lots of logging statements can take up a lot of space and take time to see if they are enabled. It would be helpful to be able to conditionally compile out by logging level.

      We might want trace level active while we are debugging, but when we ship the app we might want it completely removed.

      What I envision is something like this:

      Support definitions like LOG4CXX_DISABLE_TRACE

      and the definition for LOG4CXX_TRACE would look like this:

      #ifdef LOG4CXX_DISABLE_TRACE
      #define LOG4CXX_TRACE
      #else
      // normal definition for LOG4CXX_TRACE
      #endif

      The same thing would be done for other logging levels except for possibly ERROR and FATAL.

      Attachments

        Activity

          People

            carnold@apache.org Curt Arnold
            dalewking Dale King
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: