admin
2022-08-18 67a5e3d825fde17b7b00906ce42b0bd8cafebc4e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 * SimpleConfigurator.hh
 *
 * Copyright 2001, Glen Scott. All rights reserved.
 *
 * See the COPYING file for the terms of usage and distribution.
 */
#ifndef _LOG4CPP_PROPERTYCONFIGURATOR_HH
#define _LOG4CPP_PROPERTYCONFIGURATOR_HH
 
#include <log4cpp/Portability.hh>
#include <log4cpp/Export.hh>
 
#include <string>
#include <log4cpp/Configurator.hh>    // configure exceptions
 
namespace log4cpp {
 
    /**
       Property configurator will read a config file using the same (or similar)
       format to the config file used by log4j. This file is in a standard Java
       "properties" file format.
       <P>Example:<BR>
       <PRE>
       # a simple test config
 
       log4j.rootCategory=DEBUG, rootAppender
       log4j.category.sub1=A1
       log4j.category.sub2=INFO
       log4j.category.sub1.sub2=ERROR, A2
       
       log4j.appender.rootAppender=org.apache.log4j.ConsoleAppender
       log4j.appender.rootAppender.layout=org.apache.log4j.BasicLayout
       
       log4j.appender.A1=org.apache.log4j.FileAppender
       log4j.appender.A1.fileName=A1.log
       log4j.appender.A1.layout=org.apache.log4j.BasicLayout
       
       log4j.appender.A2=org.apache.log4j.ConsoleAppender
       log4j.appender.A2.layout=org.apache.log4j.PatternLayout
       log4j.appender.A2.layout.ConversionPattern=The message %%m at time %%d%%n
       </PRE>
       
       @since 0.3.2
    **/
    class LOG4CPP_EXPORT PropertyConfigurator {
        public:
        /**
         *
         * @param initFileName
         * @exception ConfigureFailure if the method encountered a read or
         * syntax error.
         */
        static void configure(const std::string& initFileName);
    };
}
 
#endif // _LOG4CPP_PROPERTYCONFIGURATOR_HH