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

Please make sure that the LOG4CXX_* macro's can be used as ordinary statements.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0
    • None
    • None
    • None

    Description

      The current definition of the LOG4CXX_* macro's is dubious – these macro's can trigger unexpected compiler errors. The attached test program results in the following compiler output:

      $ LC_ALL=C g++ -o conditional-logging -I/usr/local/include -Wall -Werror -W conditional-logging.cpp -L/usr/local/lib -llog4cxx
      conditional-logging.cpp: In function 'int main(int, char**)':
      conditional-logging.cpp:8: error: 'else' without a previous 'if'

      Attachments

        1. conditional-logging.cpp
          0.4 kB
          Bart Van Assche
        2. log4cxx-logmacros.patch
          8 kB
          Bart Van Assche

        Issue Links

          Activity

            People

              carnold@apache.org Curt Arnold
              bart.vanassche Bart Van Assche
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: