]> err.no Git - sope/commitdiff
new framework revision and addded missing headers
authorznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 12 Nov 2004 16:24:02 +0000 (16:24 +0000)
committerznek <znek@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Fri, 12 Nov 2004 16:24:02 +0000 (16:24 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@364 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-core/NGExtensions/NGExtensions.xcode/project.pbxproj
sope-core/NGExtensions/NGExtensions/NGLogAppender.h [new file with mode: 0644]
sope-core/NGExtensions/NGExtensions/NGLogConsoleAppender.h [new file with mode: 0644]
sope-core/NGExtensions/NGExtensions/NGLogEvent.h [new file with mode: 0644]
sope-core/NGExtensions/NGExtensions/NGLogSyslogAppender.h [new file with mode: 0644]
sope-core/NGExtensions/NGExtensions/NGLogger.h [new file with mode: 0644]
sope-core/NGExtensions/NGExtensions/NGLoggerManager.h [new file with mode: 0644]
sope-core/NGExtensions/NGExtensions/NGLogging.h [new file with mode: 0644]
sope-core/NGExtensions/NGExtensions/NSObject+ExtendedLogging.h [new file with mode: 0644]

index 518a70db18ff210d5b21b5510399d79bb5132de2..648ce6afa5f23650662e089e4a0c4a476636d6d8 100644 (file)
                        );
                        buildSettings = {
                                DYLIB_COMPATIBILITY_VERSION = 1;
-                               DYLIB_CURRENT_VERSION = 4.5.126;
+                               DYLIB_CURRENT_VERSION = 4.5.127;
                                FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks";
                                FRAMEWORK_VERSION = A;
                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
diff --git a/sope-core/NGExtensions/NGExtensions/NGLogAppender.h b/sope-core/NGExtensions/NGExtensions/NGLogAppender.h
new file mode 100644 (file)
index 0000000..975a50c
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+  Copyright (C) 2000-2004 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+
+#ifndef        __NGExtensions_NGLogAppender_H_
+#define        __NGExtensions_NGLogAppender_H_
+
+/*
+  Abstract superclass for all appenders.
+*/
+
+#import  <Foundation/Foundation.h>
+#include <NGExtensions/NSObject+ExtendedLogging.h>
+
+@class NGLogEvent;
+
+@interface NGLogAppender : NSObject
+{
+}
+
+/* subclass responsibility */
+- (void)appendLogEvent:(NGLogEvent *)_event;
+- (NSString *)formattedEvent:(NGLogEvent *)_event;
+
+- (NSString *)localizedNameOfLogLevel:(NGLogLevel)_level;
+
+@end
+
+#endif /* __NGExtensions_NGLogAppender_H_ */
diff --git a/sope-core/NGExtensions/NGExtensions/NGLogConsoleAppender.h b/sope-core/NGExtensions/NGExtensions/NGLogConsoleAppender.h
new file mode 100644 (file)
index 0000000..90fc9b0
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+  Copyright (C) 2000-2004 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+
+#ifndef        __NGExtensions_NGLogConsoleAppender_H_
+#define        __NGExtensions_NGLogConsoleAppender_H_
+
+#include <NGExtensions/NGLogAppender.h>
+
+@interface NGLogConsoleAppender : NGLogAppender
+{
+}
+
+@end
+
+#endif /* __NGExtensions_NGLogConsoleAppender_H_ */
diff --git a/sope-core/NGExtensions/NGExtensions/NGLogEvent.h b/sope-core/NGExtensions/NGExtensions/NGLogEvent.h
new file mode 100644 (file)
index 0000000..8d541bc
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+  Copyright (C) 2000-2004 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+
+#ifndef        __NGExtensions_NGLogEvent_H_
+#define        __NGExtensions_NGLogEvent_H_
+
+#import  <Foundation/Foundation.h>
+#include <NGExtensions/NSObject+ExtendedLogging.h>
+
+
+@interface NGLogEvent : NSObject
+{
+  NSString *msg;
+  NGLogLevel level;
+  NSTimeInterval date;
+}
+
+- (id)initWithLevel:(NGLogLevel)_level message:(NSString *)_msg;
+
+- (NGLogLevel)level;
+- (NSString *)message;
+- (NSDate *)date;
+
+@end
+
+#endif /* __NGExtensions_NGLogEvent_H_ */
diff --git a/sope-core/NGExtensions/NGExtensions/NGLogSyslogAppender.h b/sope-core/NGExtensions/NGExtensions/NGLogSyslogAppender.h
new file mode 100644 (file)
index 0000000..4e3b99f
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+  Copyright (C) 2000-2004 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+
+#ifndef        __NGExtensions_NGLogSyslogAppender_H_
+#define        __NGExtensions_NGLogSyslogAppender_H_
+
+#include <NGExtensions/NGLogAppender.h>
+
+@interface NGLogSyslogAppender : NGLogAppender
+{
+}
+
++ (id)sharedAppender;
+
+/* provide syslog identifier */
+- (id)initWithIdentifier:(NSString *)_ident;
+
+@end
+
+#endif /* __NGExtensions_NGLogSyslogAppender_H_ */
diff --git a/sope-core/NGExtensions/NGExtensions/NGLogger.h b/sope-core/NGExtensions/NGExtensions/NGLogger.h
new file mode 100644 (file)
index 0000000..1e9ddfc
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+  Copyright (C) 2000-2004 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+
+#ifndef        __NGExtensions_NGLogger_H_
+#define        __NGExtensions_NGLogger_H_
+
+/*
+  The logger, modeled closely after log4j.
+ */
+
+#import  <Foundation/Foundation.h>
+#include <NGExtensions/NSObject+ExtendedLogging.h>
+
+
+@interface NGLogger : NSObject
+{
+  NGLogLevel logLevel;
+  id _appender; // going away as soon as we have a config
+}
+
+- (id)initWithLogLevel:(NGLogLevel)_level;
+
+- (void)logLevel:(NGLogLevel)_level message:(NSString *)_msg;
+- (void)logLevel:(NGLogLevel)_level withFormat:(NSString *)_fmt, ...;
+
+- (void)setLogLevel:(NGLogLevel)_level;
+- (NGLogLevel)logLevel;
+
+@end
+
+#endif /* __NGExtensions_NGLogger_H_ */
diff --git a/sope-core/NGExtensions/NGExtensions/NGLoggerManager.h b/sope-core/NGExtensions/NGExtensions/NGLoggerManager.h
new file mode 100644 (file)
index 0000000..26214f5
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+  Copyright (C) 2000-2004 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+
+#ifndef        __NGExtensions_NGLoggerManager_H_
+#define        __NGExtensions_NGLoggerManager_H_
+
+#import <Foundation/Foundation.h>
+
+@class NGLogger;
+
+@interface NGLoggerManager : NSObject
+{
+  NSMutableDictionary *loggerMap;
+}
+
++ (id)defaultManager;
+
+- (NGLogger *)loggerForDefaultKey:(NSString *)_defaultKey;
+
+@end
+
+#endif /* __NGExtensions_NGLoggerManager_H_ */
diff --git a/sope-core/NGExtensions/NGExtensions/NGLogging.h b/sope-core/NGExtensions/NGExtensions/NGLogging.h
new file mode 100644 (file)
index 0000000..b4d0b4b
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+  Copyright (C) 2000-2004 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+
+#ifndef        __NGExtensions_NGLogging_H_
+#define        __NGExtensions_NGLogging_H_
+
+/*
+  NGLogging is a somewhat more sophisticated logging framework, modeled
+  apparently similar to log4j - without some of its bloat.
+*/
+
+#include <NGExtensions/NSObject+ExtendedLogging.h>
+#include <NGExtensions/NGLogger.h>
+#include <NGExtensions/NGLoggerManager.h>
+#include <NGExtensions/NGLogEvent.h>
+#include <NGExtensions/NGLogAppender.h>
+#include <NGExtensions/NGLogConsoleAppender.h>
+#include <NGExtensions/NGLogSyslogAppender.h>
+
+#endif /* __NGExtensions_NGLogging_H_ */
diff --git a/sope-core/NGExtensions/NGExtensions/NSObject+ExtendedLogging.h b/sope-core/NGExtensions/NGExtensions/NSObject+ExtendedLogging.h
new file mode 100644 (file)
index 0000000..1552441
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+  Copyright (C) 2000-2004 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+
+#ifndef        __NSObject_ExtendedLogging_H_
+#define        __NSObject_ExtendedLogging_H_
+
+#import <Foundation/Foundation.h>
+
+typedef enum {
+  NGLogLevelOff   = 0,
+  NGLogLevelDebug = 1,
+  NGLogLevelInfo  = 2,
+  NGLogLevelWarn  = 3,
+  NGLogLevelError = 4,
+  NGLogLevelFatal = 5,
+  NGLogLevelAll   = 6
+} NGLogLevel;
+
+@interface NSObject (NGExtendedLogging)
+
+- (id)logger;
+
+- (void)logDebugWithFormat:(NSString *)_fmt, ...;
+- (void)logInfoWithFormat:(NSString *)_fmt, ...;
+- (void)logWarnWithFormat:(NSString *)_fmt, ...;
+- (void)logErrorWithFormat:(NSString *)_fmt, ...;
+- (void)logFatalWithFormat:(NSString *)_fmt, ...;
+
+- (BOOL)isLogDebugEnabled;
+- (BOOL)isLogInfoEnabled;
+- (BOOL)isLogWarnEnabled;
+- (BOOL)isLogErrorEnabled;
+- (BOOL)isLogFatalEnabled;
+
+- (void)logLevel:(NGLogLevel)_level message:(NSString *)_msg;
+- (void)logLevel:(NGLogLevel)_level withFormat:(NSString *)_fmt, ...;
+
+@end
+
+#endif /* __NSObject_ExtendedLogging_H_ */