]> err.no Git - sope/blob - sope-core/NGExtensions/NGExtensions/NSObject+Logs.h
fixed copyrights for 2005
[sope] / sope-core / NGExtensions / NGExtensions / NSObject+Logs.h
1 /*
2   Copyright (C) 2004-2005 SKYRIX Software AG
3
4   This file is part of SOPE.
5
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
9   later version.
10
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.
15
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
19   02111-1307, USA.
20 */
21
22 #ifndef __NGExtensions_NSObject_Logs_H__
23 #define __NGExtensions_NSObject_Logs_H__
24
25 #import <Foundation/NSObject.h>
26 #import <Foundation/NSString.h>
27
28 @interface NSObject(NGLogs)
29
30 /* default loggers for object */
31 - (id)logger;
32 - (id)debugLogger;
33
34 /* "end user" methods, variable argument logging methods .. */
35 - (void)debugWithFormat:(NSString *)_fmt, ...;
36 - (void)logWithFormat:(NSString *)_fmt, ...;
37 - (void)warnWithFormat:(NSString *)_fmt, ...;
38 - (void)errorWithFormat:(NSString *)_fmt, ...;
39 - (void)fatalWithFormat:(NSString *)_fmt, ...;
40
41 /* prefix, override that, to make a special logging prefix */
42 - (NSString *)loggingPrefix;
43
44 /* says whether debugging is enabled for object ... */
45 - (BOOL)isDebuggingEnabled;
46
47 /*"designated" logging methods */
48 - (void)debugWithFormat:(NSString *)_fmt arguments:(va_list)_va;
49 - (void)logWithFormat:(NSString *)_fmt   arguments:(va_list)_va;
50 - (void)warnWithFormat:(NSString *)_fmt  arguments:(va_list)_va;
51 - (void)errorWithFormat:(NSString *)_fmt arguments:(va_list)_va;
52 - (void)fatalWithFormat:(NSString *)_fmt arguments:(va_list)_va;
53
54 @end
55
56 #endif /* __NGExtensions_NSObject_Logs_H__ */