1 // Module: Log4CPLUS
2 // File: loggerfactory.h
3 // Created: 6/2001
4 // Author: Tad E. Smith
5 //
6 //
7 // Copyright (C) Tad E. Smith All rights reserved.
8 //
9 // This software is published under the terms of the Apache Software
10 // License version 1.1, a copy of which has been included with this
11 // distribution in the LICENSE.APL file.
12 //
13
14 /** @file */
15
16 #ifndef _LOG4CPLUS_SPI_LOGGER_FACTORY_HEADER
17 #define _LOG4CPLUS_SPI_LOGGER_FACTORY_HEADER
18
19 #include <log4cplus/config.h>
20 #include <log4cplus/tstring.h>
21 #include <log4cplus/helpers/pointer.h>
22
23
24 namespace log4cplus {
25 // Forward Declarations
26 class Logger;
27 class Hierarchy;
28
29 namespace spi {
30 /**
31 * Implement this interface to create new instances of Logger or
32 * a sub-class of Logger.
33 */
34 class LOG4CPLUS_EXPORT LoggerFactory {
35 public:
36 /**
37 * Creates a new <code>Logger</code> object.
38 */
39 virtual Logger makeNewLoggerInstance(const log4cplus::tstring& name,
40 Hierarchy& h) = 0;
41 virtual ~LoggerFactory(){}
42 };
43
44 } // end namespace spi
45 } // end namespace log4cplus
46
47 #endif // _LOG4CPLUS_SPI_LOGGER_FACTORY_HEADER
syntax highlighted by Code2HTML, v. 0.9.1