Menu

Configuration file

Help
2002-07-24
2003-03-28
  • Slimane AMAR

    Slimane AMAR - 2002-07-24

    Hi all,

    At first, thanks for the tricks to compile log4cpp whit Sun CC 5.x (that works fine).

    I'm new to log4cpp and I need some help to use a configuration file
    (xml or other format).
    Can someone give me an example of file.

    Thanks

     
    • RAGHAVAN RAMANATHAN

      I believe the current version of logcpp does not support the use of configuration files(xml or otherwise).

       
    • Bastiaan Bakker

      Bastiaan Bakker - 2003-03-05

      It does! Have a look at the PropertyConfigurator class. It can read log4j compatible configuration property files.
      See the tests subdirectory for some examples.

      Bastiaan Bakker

       
    • Anonymous

      Anonymous - 2003-03-28

      Hi there!

      I am using the latest stable release: log4cpp-0.2.7.tar.gz and there is not any log4j compatible PropertyConfigurator. May be it was added to the some 0.3.x version.

      With log4cpp-0.2.7 I use log4cpp::SimpleConfigurator, maybe it is depricated in the next versions, but there is a sample of my log4cpp.init:

      #category root
      appender root basic file c:/var/log/APValidator.log
      #appender root pattern file c:/var/log/APValidator.log %d-%p-%c : %m%n
      priority root DEBUG

      #category CMD5Validator
      appender CMD5Validator basic file c:/var/log/CMD5Validator.log
      priority CMD5Validator DEBUG

      #category UtilMD5Validator
      appender UtilMD5Validator basic file c:/var/log/UtilMD5Validator.log
      priority UtilMD5Validator DEBUG

      tests subdirectory consists an example of using log4cpp::SimpleConfigurator (tests/testConfig.cpp).

      best regards,
      Leonid

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.