2 Copyright (C) 2004-2005 SKYRIX Software AG
4 This file is part of SOPE.
6 SOPE is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef __NGExtensions_NGLogAppender_H_
23 #define __NGExtensions_NGLogAppender_H_
28 Abstract superclass for all log appenders.
30 NGLogAppender honours the following user default keys:
32 User Default key Function
33 ----------------------------------------------------------------------------
34 NGLogDefaultAppenderClass The appender class to use if no class
35 information was provided by the configuration.
36 The fallback is "NGLogStdoutAppender".
39 The following keys in the configuration dictionary will be recognized:
42 ----------------------------------------------------------------------------
43 "Class" The class to use for instance creation. If no
44 class name is provided, the fallback path
45 described above will be taken.
47 "Formatter" Dictionary suitable as configuration
48 provided to NGLogEventFormatters's factory
49 method. Please see NGLogEventFormatteer.h for
53 #import <Foundation/NSObject.h>
54 #include <NGExtensions/NGLogLevel.h>
56 @class NSDictionary, NGLogEvent, NGLogEventFormatter;
58 @interface NGLogAppender : NSObject
60 NGLogEventFormatter *formatter;
64 + (id)logAppenderFromConfig:(NSDictionary *)_config;
66 /* designated initializer */
67 - (id)initWithConfig:(NSDictionary *)_config;
69 /* subclass responsibility */
70 - (void)appendLogEvent:(NGLogEvent *)_event;
71 - (NSString *)formattedEvent:(NGLogEvent *)_event;
75 #endif /* __NGExtensions_NGLogAppender_H_ */