SimpleConfigurator.hh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * SimpleConfigurator.hh
  3. *
  4. * Copyright 2001, Glen Scott. All rights reserved.
  5. *
  6. * See the COPYING file for the terms of usage and distribution.
  7. */
  8. #ifndef _LOG4CPP_SIMPLECONFIGURATOR_HH
  9. #define _LOG4CPP_SIMPLECONFIGURATOR_HH
  10. #include "Base/GCException.h"
  11. #include <log4cpp/Portability.hh>
  12. #include <iostream>
  13. #include <string>
  14. #include <log4cpp/Configurator.hh>
  15. LOG4CPP_NS_BEGIN
  16. /**
  17. * This class implements a simple configurator for log4cpp.
  18. * It is a temporary hack with an undocumented configuration format.
  19. * @deprecated As of version 0.3.2 log4cpp includes a log4j format
  20. * compatible PropertyConfigurator, removing the need for
  21. * SimpleConfigurator. This class will be removed in 0.4.0.
  22. **/
  23. class LOG4CPP_EXPORT SimpleConfigurator {
  24. public:
  25. /**
  26. * Configure log4cpp with the configuration in the given file.
  27. * NB. The configuration file format is undocumented and may change
  28. * without notice.
  29. * @since 0.2.6
  30. * @param initFileName name of the configuration file
  31. * @exception GenICam::InvalidArgumentException if the method encountered a read or
  32. * syntax error.
  33. **/
  34. static void configure(const std::string& initFileName);
  35. // throw(GenICam::InvalidArgumentException);
  36. /**
  37. * Configure log4cpp with the configuration in the given file.
  38. * NB. The configuration file format is undocumented and may change
  39. * without notice.
  40. * @since 0.3.1
  41. * @param initFile an input stream to the configuration file
  42. * @exception GenICam::InvalidArgumentException if the method encountered a read or
  43. * syntax error.
  44. **/
  45. static void configure(std::istream& initFile);
  46. // throw(GenICam::InvalidArgumentException);
  47. };
  48. LOG4CPP_NS_END
  49. #endif