From: znek Date: Thu, 18 Nov 2004 04:49:10 +0000 (+0000) Subject: overhauled logging for NGExtensions which NGObjWeb uses X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cfb660b54e7c7061fe31a17f5b5e35b9ec7288d;p=sope overhauled logging for NGExtensions which NGObjWeb uses git-svn-id: http://svn.opengroupware.org/SOPE/trunk@394 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m b/sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m index d08cd24a..1ceadd0e 100644 --- a/sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m +++ b/sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: WOKeyPathAssociation.m 1 2004-08-20 10:08:27Z znek $ #include "WOKeyPathAssociation.h" #include @@ -289,7 +289,8 @@ _parseKeyPath(WOKeyPathAssociation *self,NSString *_keyPath) if ([_keyPath length] < 1) { self = [self autorelease]; self = nil; - NSLog(@"ERROR: passed invalid keypath (%@) to association !", _keyPath); + [self errorWithFormat: + @"passed invalid keypath (%@) to association !", _keyPath]; return nil; } if ((self = [super init])) { diff --git a/sope-appserver/NGObjWeb/Associations/WOLabelAssociation.m b/sope-appserver/NGObjWeb/Associations/WOLabelAssociation.m index 7b0d282c..ee637240 100644 --- a/sope-appserver/NGObjWeb/Associations/WOLabelAssociation.m +++ b/sope-appserver/NGObjWeb/Associations/WOLabelAssociation.m @@ -43,7 +43,7 @@ withDefaultValue:(NSString *)_default { if ([_key length] == 0) { - [self debugWithFormat:@"WARNING: missing label key!"]; + [self warnWithFormat:@"missing label key!"]; [self release]; return nil; } @@ -127,7 +127,7 @@ if ((rm = [_component resourceManager]) == nil) rm = [[WOApplication application] resourceManager]; if (rm == nil) - [self debugWithFormat:@"WARNING: missing resource manager!"]; + [self warnWithFormat:@"missing resource manager!"]; /* get parameters */ diff --git a/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.m b/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.m index 2243ea1a..68ff5b24 100644 --- a/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.m +++ b/sope-appserver/NGObjWeb/Associations/WOResourceURLAssociation.m @@ -47,8 +47,8 @@ static BOOL doDebug = NO; - (id)initWithString:(NSString *)_name { if ([_name length] == 0) { if (doDebug) { - NSLog(@"WARNING(%s): got passed no resource name!", - __PRETTY_FUNCTION__); + [self warnWithFormat:@"(%s): got passed no resource name!", + __PRETTY_FUNCTION__]; } [self release]; return nil; @@ -114,7 +114,7 @@ static BOOL doDebug = NO; rm = [app resourceManager]; } if (rm == nil) { - [self logWithFormat:@"WARNING: found no resource manager!"]; + [self warnWithFormat:@"found no resource manager!"]; return nil; } if (doDebug) [self debugWithFormat:@" resource-manager: %@", rm]; diff --git a/sope-appserver/NGObjWeb/Associations/common.h b/sope-appserver/NGObjWeb/Associations/common.h index 0ebf13ff..2de6d49a 100644 --- a/sope-appserver/NGObjWeb/Associations/common.h +++ b/sope-appserver/NGObjWeb/Associations/common.h @@ -29,5 +29,5 @@ #include #define IS_DEPRECATED \ - NSLog(@"WARNING: used deprecated method: %s:%i.", \ - __PRETTY_FUNCTION__, __LINE__); + [self warnWithFormat:@"used deprecated method: %s:%i.", \ + __PRETTY_FUNCTION__, __LINE__]; diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index 7dea7b8c..6b77d557 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,43 @@ +2004-11-18 Marcus Mueller + + * v4.5.91 + + * Associations/{WOKeyPathAssociation.m, WOLabelAssociation.m, + WOResourceURLAssociation.m, common.h}, + DynamicElements/{WOForm.m, WOGenericElement.m, WOImage.m, + WOPopUpButton.m, WOString.m, WOxHTMLElemBuilder.m, + WOxMiscElemBuilder.m, _WOTemporaryHyperlink.m}, + NGObjWeb/WOxElemBuilder.h, + SoObjects/{SoActionInvocation.m, SoClassSecurityInfo.m, + SoComponent.m, SoObject+Traversal.m, SoObject.m, + SoObjectRequestHandler.m, SoObjectSOAPDispatcher.m, + SoObjectXmlRpcDispatcher.m, SoPageInvocation.m, SoProduct.m, + SoProductClassInfo.m, SoProductRegistry.m, + SoProductResourceManager.m, SoSelectorInvocation.m}, + Templates/{WOApplication+Builders.m, WOComponentScriptPart.m, + WODParser.m, WOHTMLParser.m, WOWrapperTemplateBuilder.m, + WOxComponentElemBuilder.m, WOxElemBuilder.m, common.h}, + WebDAV/{SaxDAVHandler.m, SoDAVSQLParser.m, SoObject+SoDAV.m, + SoObject+SoDAVQuery.m, SoObjectWebDAVDispatcher.m, + SoWebDAVRenderer.m}, + WOHttpAdaptor/{WOHttpAdaptor.m, WOHttpTransaction.m, + WORequestParser.m}, + NGHttp+WO.m, OWResourceManager.m, SNSConnection.m, + WEClientCapabilities.m, WOApplication.m, WOChildComponentReference.m, + WOComponent.m, WOComponentDefinition.m, WOComponentRequestHandler.m, + WOContext.m, WOCoreApplication+Bundle.m, WOCoreApplication.m, + WODirectAction.m, WODirectActionRequestHandler.m, WODisplayGroup.m, + WODynamicElement.m, WOElementID.m, WOFileSessionStore.m, + WOMessage.m, WOPageRequestHandler.m, WORequest.m, WORequestHandler.m, + WOResourceManager.m, WORunLoop.m, WOServerSessionStore.m, + WOSimpleHTTPParser.m, _WOStringTable.m, common.h: + changed to use new logging API, various code cleanup. + + * WOHttpAdaptor/WOHttpAdaptor.m: + + * NGObjWeb.xcode, SoObjects/SoObjects.xcode, WebDAV/WebDAV.xcode: + bumped framework version + 2004-11-18 Helge Hess * WORequestHandler.m: removed double click hack, not necessary anymore @@ -10,7 +50,7 @@ used as the path for the session-id cookie (related to OGo bug #914 (v4.5.89) -2004-11-05 Helge Hess +2004-11-15 Helge Hess * WOSimpleHTTPParser.m: set a default file boundary size and max upload size if the Defaults.plist was not loaded (eg in xmlrpc_call with diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOForm.m b/sope-appserver/NGObjWeb/DynamicElements/WOForm.m index be86a9f0..0143fe02 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOForm.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOForm.m @@ -102,8 +102,8 @@ static int debugTakeValues = -1; } if ([_ctx isInForm]) { - NSLog(@"ERROR(%s): another form is already active in context !", - __PRETTY_FUNCTION__); + [self errorWithFormat:@"(%s): another form is already active in context !", + __PRETTY_FUNCTION__]; } [_ctx setInForm:YES]; @@ -180,7 +180,7 @@ static int debugTakeValues = -1; if (![_ctx isInForm]) { [[_ctx component] - logWithFormat:@"ERROR(%s:%d): -isInForm is NO !!!", + errorWithFormat:@"(%s:%d): -isInForm is NO !!!", __PRETTY_FUNCTION__, __LINE__]; } else diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOGenericElement.m b/sope-appserver/NGObjWeb/DynamicElements/WOGenericElement.m index 70b21ead..5c1a4ac3 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOGenericElement.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOGenericElement.m @@ -175,7 +175,7 @@ typedef struct { if (self->tagName) free(self->tagName); break; default: - NSLog(@"ERROR: unknown tag-name-type %i !", self->tagNameType); + [self errorWithFormat:@"unknown tag-name-type %i !", self->tagNameType]; break; } [super dealloc]; diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOImage.m b/sope-appserver/NGObjWeb/DynamicElements/WOImage.m index a3710078..6bb520f3 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOImage.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOImage.m @@ -388,7 +388,7 @@ } - (void)dealloc { - NSLog(@"ERROR: called dealloc on %@", self); + [self errorWithFormat:@"called dealloc on %@", self]; #if DEBUG abort(); #endif diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOPopUpButton.m b/sope-appserver/NGObjWeb/DynamicElements/WOPopUpButton.m index 1c116d1c..9da50ea9 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOPopUpButton.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOPopUpButton.m @@ -87,15 +87,14 @@ static NSNumber *yesNum = nil; @"Note: template uses deprecated 'singleSelection' binding!"]; } else { - [self debugWithFormat: - @"ERROR: 'singleSelection' binding is set to NO, which is " - @"unsupported now!"]; + [self errorWithFormat: + @"'singleSelection' binding is set to NO, which is " + @"unsupported now!"]; } } else { - [self logWithFormat: - @"ERROR: will ignore deprecated 'singleSelection' binding: %@", - tmp]; + [self errorWithFormat: + @"will ignore deprecated 'singleSelection' binding: %@", tmp]; } [tmp release]; } diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOString.m b/sope-appserver/NGObjWeb/DynamicElements/WOString.m index 648f6efc..3a895e79 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOString.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOString.m @@ -773,7 +773,7 @@ static inline Class _classForConfig(NSDictionary *_config) { } - (void)dealloc { - NSLog(@"ERROR: called dealloc on %@", self); + [self errorWithFormat:@"called dealloc on %@", self]; #if DEBUG abort(); #endif diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOxHTMLElemBuilder.m b/sope-appserver/NGObjWeb/DynamicElements/WOxHTMLElemBuilder.m index 4eb31c85..8497abde 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOxHTMLElemBuilder.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOxHTMLElemBuilder.m @@ -109,8 +109,8 @@ else if (c1 == 'h' && [type isEqualToString:@"hidden"]) return NSClassFromString(@"WOHiddenField"); else if (c1 == 'b' && [type isEqualToString:@"button"]) { - [self logWithFormat:@"WARNING: selecting WOSubmitButton for " - @"input with type 'button' !"]; + [self warnWithFormat:@"selecting WOSubmitButton for " + @"input with type 'button' !"]; return NSClassFromString(@"WOSubmitButton"); } break; @@ -125,7 +125,7 @@ break; } - [self logWithFormat:@"WARNING: unknown input type '%@' !", type]; + [self warnWithFormat:@"unknown input type '%@' !", type]; return NSClassFromString(@"WOTextField"); } diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOxMiscElemBuilder.m b/sope-appserver/NGObjWeb/DynamicElements/WOxMiscElemBuilder.m index af81c660..3fe0f68b 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOxMiscElemBuilder.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOxMiscElemBuilder.m @@ -87,9 +87,9 @@ case 'n': if ([tag isEqualToString:@"nbsp"]) { - NSLog(@"WARNING(%s): found , " - @"use !", - __PRETTY_FUNCTION__); + [self warnWithFormat:@"%s: found , " + @"use !", + __PRETTY_FUNCTION__]; return NSClassFromString(@"WOEntity"); } break; diff --git a/sope-appserver/NGObjWeb/DynamicElements/_WOTemporaryHyperlink.m b/sope-appserver/NGObjWeb/DynamicElements/_WOTemporaryHyperlink.m index e3497ee6..deeb0153 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/_WOTemporaryHyperlink.m +++ b/sope-appserver/NGObjWeb/DynamicElements/_WOTemporaryHyperlink.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: _WOTemporaryHyperlink.m 1 2004-08-20 10:08:27Z znek $ #include "WOHyperlink.h" #include "WOHyperlinkInfo.h" @@ -143,7 +143,7 @@ static Class _WODirectActionHyperlinkClass = Nil; } - (void)dealloc { - NSLog(@"ERROR: called dealloc on %@", self); + [self errorWithFormat:@"called dealloc on %@", self]; #if DEBUG abort(); #endif diff --git a/sope-appserver/NGObjWeb/NGHttp+WO.m b/sope-appserver/NGObjWeb/NGHttp+WO.m index b990e282..3e83d4fc 100644 --- a/sope-appserver/NGObjWeb/NGHttp+WO.m +++ b/sope-appserver/NGObjWeb/NGHttp+WO.m @@ -47,7 +47,7 @@ static Class NSArrayClass = Nil; /* transfer cookies */ if ([[_request cookies] count] > 0) - NSLog(@"WARNING: cannot transfer cookies to NGHttpRequest yet !"); + [self warnWithFormat:@"cannot transfer cookies to NGHttpRequest yet !"]; /* transfer headers !!! */ @@ -294,8 +294,8 @@ static Class DispClass = Nil; ebody = [self body]; if (![ebody isKindOfClass:[NGMimeMultipartBody class]]) { - [self logWithFormat: - @"ERROR: form-data parser expected MultipartBody, got %@", ebody]; + [self errorWithFormat: + @"form-data parser expected MultipartBody, got %@", ebody]; return [[NGHashMap alloc] init]; } @@ -317,9 +317,8 @@ static Class DispClass = Nil; [[bodyPart valuesOfHeaderFieldWithName:@"content-disposition"]nextObject]; if (disposition == nil) { - [self logWithFormat: - @"ERROR: did not find content disposition in form part %@", - bodyPart]; + [self errorWithFormat: + @"did not find content disposition in form part %@", bodyPart]; continue; } diff --git a/sope-appserver/NGObjWeb/NGHttp/ChangeLog b/sope-appserver/NGObjWeb/NGHttp/ChangeLog index 3539d2f8..e2b5cb9a 100644 --- a/sope-appserver/NGObjWeb/NGHttp/ChangeLog +++ b/sope-appserver/NGObjWeb/NGHttp/ChangeLog @@ -1,3 +1,7 @@ +2004-11-18 Marcus Mueller + + * NGHttp.xcode: bumped the framework version + 2004-11-07 Marcus Mueller * NGHttp.xcode: bumped the framework version diff --git a/sope-appserver/NGObjWeb/NGHttp/NGHttp.xcode/project.pbxproj b/sope-appserver/NGObjWeb/NGHttp/NGHttp.xcode/project.pbxproj index ef2fe08b..9e6541d1 100644 --- a/sope-appserver/NGObjWeb/NGHttp/NGHttp.xcode/project.pbxproj +++ b/sope-appserver/NGObjWeb/NGHttp/NGHttp.xcode/project.pbxproj @@ -464,7 +464,7 @@ ); buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 4.5.84; + DYLIB_CURRENT_VERSION = 4.5.91; FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks"; FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = YES; diff --git a/sope-appserver/NGObjWeb/NGObjWeb.xcode/project.pbxproj b/sope-appserver/NGObjWeb/NGObjWeb.xcode/project.pbxproj index a36f0a8f..0e89de1b 100644 --- a/sope-appserver/NGObjWeb/NGObjWeb.xcode/project.pbxproj +++ b/sope-appserver/NGObjWeb/NGObjWeb.xcode/project.pbxproj @@ -1655,7 +1655,7 @@ ); buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 4.5.84; + DYLIB_CURRENT_VERSION = 4.5.91; FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks"; FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = YES; diff --git a/sope-appserver/NGObjWeb/NGObjWeb/WOxElemBuilder.h b/sope-appserver/NGObjWeb/NGObjWeb/WOxElemBuilder.h index 7a215476..22ba4c0d 100644 --- a/sope-appserver/NGObjWeb/NGObjWeb/WOxElemBuilder.h +++ b/sope-appserver/NGObjWeb/NGObjWeb/WOxElemBuilder.h @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: WOxElemBuilder.h 1 2004-08-20 10:08:27Z znek $ #ifndef __WOxElemBuilder_H__ #define __WOxElemBuilder_H__ @@ -102,8 +102,10 @@ /* logging */ +/* - (void)logWithFormat:(NSString *)_format, ...; - (void)debugWithFormat:(NSString *)_format, ...; +*/ /* managing builder queues */ diff --git a/sope-appserver/NGObjWeb/OWResourceManager.m b/sope-appserver/NGObjWeb/OWResourceManager.m index 4e2f0ea0..179f48f0 100644 --- a/sope-appserver/NGObjWeb/OWResourceManager.m +++ b/sope-appserver/NGObjWeb/OWResourceManager.m @@ -221,8 +221,8 @@ _pathExists(OWResourceManager *self, NSFileManager *fm, NSString *path) fm = [self fileManager]; if ([self->base length] > 0) { if (![fm fileExistsAtPath:self->base]) { - NSLog(@"WARNING(%s): Resources base path '%@' does not exist !", - __PRETTY_FUNCTION__, self->base); + [self warnWithFormat:@"(%s): Resources base path '%@' does not exist !", + __PRETTY_FUNCTION__, self->base]; return nil; } } @@ -259,8 +259,8 @@ _pathExists(OWResourceManager *self, NSFileManager *fm, NSString *path) if ([self->resources length] > 0) { if (![fm fileExistsAtPath:self->resources]) { - [self debugWithFormat: - @"WARNING(%s): Resources path %@ does not exist !", + [self warnWithFormat: + @"(%s): Resources path %@ does not exist !", __PRETTY_FUNCTION__, self->resources]; [self->resources release]; self->resources = nil; } @@ -304,8 +304,8 @@ _pathExists(OWResourceManager *self, NSFileManager *fm, NSString *path) static BOOL didLog = NO; if (!didLog) { didLog = YES; - [self debugWithFormat: - @"WARNING(%s): WebServerResources path '%@' does not exist !", + [self warnWithFormat: + @"(%s): WebServerResources path '%@' does not exist !", __PRETTY_FUNCTION__, self->w3resources]; } [self->w3resources release]; self->w3resources = nil; @@ -593,14 +593,15 @@ _pathExists(OWResourceManager *self, NSFileManager *fm, NSString *path) languages:(NSArray *)_langs { /* search for component wrapper .. */ - // TODO: shouldn't we used that for WOx as well? + // TODO: shouldn't we use that for WOx as well? NSEnumerator *e; NSString *ext; if (_name == nil) { #if DEBUG - NSLog(@"WARNING(%s): tried to get path to component with name !", - __PRETTY_FUNCTION__); + [self warnWithFormat:@"(%s): tried to get path to component with " + @" name !", + __PRETTY_FUNCTION__]; #endif return nil; } @@ -788,8 +789,8 @@ _pathExists(OWResourceManager *self, NSFileManager *fm, NSString *path) } if (!isDirectory) { - NSLog(@"WARNING(%s): language entry %@ is not a directory !", - __PRETTY_FUNCTION__, languagePath); + [self warnWithFormat:@"(%s): language entry %@ is not a directory !", + __PRETTY_FUNCTION__, languagePath]; if (doesCache && (compoundKey != nil)) { // register null in cache, so that we know it's non-existent NSMapInsert(self->componentDefinitions, compoundKey, null); @@ -828,9 +829,9 @@ _pathExists(OWResourceManager *self, NSFileManager *fm, NSString *path) baseURL:[NSURL URLWithString:baseUrl] frameworkName:nil]; if (cdef == nil) { - NSLog(@"WARNING(%s): could not load component definition of " - @"'%@' from language project: %@", - __PRETTY_FUNCTION__, _name, languagePath); + [self warnWithFormat:@"(%s): could not load component definition of " + @"'%@' from language project: %@", + __PRETTY_FUNCTION__, _name, languagePath]; if (doesCache && (compoundKey != nil)) { // register null in cache, so that we know it's non-existent NSMapInsert(self->componentDefinitions, compoundKey, null); @@ -1035,9 +1036,9 @@ _pathExists(OWResourceManager *self, NSFileManager *fm, NSString *path) baseURL:[NSURL URLWithString:baseUrl] frameworkName:nil]; if (cdef == nil) { - NSLog(@"WARNING(%s): could not load component definition of '%@' from " - @"component wrapper: '%@'", - __PRETTY_FUNCTION__, _name, componentURL); + [self warnWithFormat:@"(%s): could not load component definition of " + @"'%@' from component wrapper: '%@'", + __PRETTY_FUNCTION__, _name, componentURL]; if (doesCache) { /* register null in cache, so that we know it's non-existent */ NSMapInsert(self->componentDefinitions, componentURL, null); diff --git a/sope-appserver/NGObjWeb/SNSConnection.m b/sope-appserver/NGObjWeb/SNSConnection.m index 43276da1..51ebd267 100644 --- a/sope-appserver/NGObjWeb/SNSConnection.m +++ b/sope-appserver/NGObjWeb/SNSConnection.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: SNSConnection.m 14 2004-08-20 21:07:18Z helge $ #include "SNSConnection.h" #include @@ -94,8 +94,9 @@ typedef enum { sns = NGSocketAddressFromString([ud stringForKey:@"SNSPort"]); if (sns == nil) { - NSLog(@"ERROR(%s): Could not create socket address for snsd(port=%@).", - __PRETTY_FUNCTION__, sns); + [self errorWithFormat: + @"(%s): Could not create socket address for snsd(port=%@).", + __PRETTY_FUNCTION__, sns]; RELEASE(self); return; } @@ -127,8 +128,9 @@ typedef enum { #endif if (![self->socket isConnected]) { - NSLog(@"ERROR: Could not connect socket %@ to snsd (port=%@), " - @"terminating: %@", self->socket, sns, [self->socket lastException]); + [self errorWithFormat:@"Could not connect socket %@ to snsd (port=%@), " + @"terminating: %@", + self->socket, sns, [self->socket lastException]]; ASSIGN(self->socket, (id)nil); RELEASE(self); [[WOApplication application] terminate]; @@ -150,7 +152,7 @@ typedef enum { NS_ENDHANDLER; if (self->socket == nil) { - NSLog(@"ERROR: Could not register with snsd (port=%@).", sns); + [self errorWithFormat:@"Could not register with snsd (port=%@).", sns]; RELEASE(self); return; } @@ -359,7 +361,7 @@ typedef enum { } - (void)lostConnectionToNameServer:(NSException *)_exception { - NSLog(@"ERROR: application lost connection to snsd: %@", _exception); + [self errorWithFormat:@"application lost connection to snsd: %@", _exception]; [[WOApplication application] terminate]; } - (void)lostConnectionToNameServer { diff --git a/sope-appserver/NGObjWeb/SoObjects/SoActionInvocation.m b/sope-appserver/NGObjWeb/SoObjects/SoActionInvocation.m index 3a1f5d60..eb5318df 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoActionInvocation.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoActionInvocation.m @@ -104,7 +104,7 @@ static int debugOn = 0; // TODO: I guess that should be improved a bit in the dispatcher if ((soapEnvelope = [_ctx valueForKey:@"SOAPEnvelope"]) == nil) { // TODO: generate some kind of fault? (NSException?) - [self logWithFormat:@"ERROR: no SOAP envelope available in context!"]; + [self errorWithFormat:@"no SOAP envelope available in context!"]; return nil; } @@ -131,8 +131,8 @@ static int debugOn = 0; if ([_type isEqualToString:@"SOAP"]) return [self extractSOAPArgumentsFromContext:_ctx specification:_spec]; - [self logWithFormat: - @"ERROR: cannot extract parameters for request type: '%@'", _type]; + [self errorWithFormat: + @"cannot extract parameters for request type: '%@'", _type]; return nil; } @@ -155,8 +155,8 @@ static int debugOn = 0; /* find class */ if ((clazz = NSClassFromString([self actionClassName])) == Nil) { - [self logWithFormat:@"ERROR: did not find action class: %@", - [self actionClassName]]; + [self errorWithFormat:@"did not find action class: %@", + [self actionClassName]]; return nil; } @@ -218,8 +218,8 @@ static int debugOn = 0; infoCount = [info count]; argCount = [_args count]; if ((info == nil) && (argCount > 0)) { - [self logWithFormat: - @"WARNING: found no argument specification for positional keys!"]; + [self warnWithFormat: + @"found no argument specification for positional keys!"]; return; } @@ -227,8 +227,8 @@ static int debugOn = 0; for (i = 0; i < argCount; i++) { if (i >= infoCount) { - [self logWithFormat: - @"WARNING: could not apply argument %d (no key info)", (i + 1)]; + [self warnWithFormat: + @"could not apply argument %d (no key info)", (i + 1)]; continue; } @@ -338,8 +338,7 @@ static int debugOn = 0; inv->methodObject = [[inv instantiateMethodInContext:_ctx] retain]; if (inv->methodObject == nil) { - [self logWithFormat:@"ERROR: did not find method '%@'", - [self actionClassName]]; + [self errorWithFormat:@"did not find method '%@'", [self actionClassName]]; return nil; } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoClassSecurityInfo.m b/sope-appserver/NGObjWeb/SoObjects/SoClassSecurityInfo.m index e925ed53..52b2afa6 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoClassSecurityInfo.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoClassSecurityInfo.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: SoClassSecurityInfo.m 1 2004-08-20 10:08:27Z znek $ #include "SoClassSecurityInfo.h" #include "SoClass.h" @@ -47,9 +47,8 @@ /* attribute security */ - (void)_logPermAlreadySetForName:(NSString *)_name { - [self logWithFormat: - @"WARNING: tried to declare permission for attribute '%@' twice!", - _name]; + [self warnWithFormat: + @"tried to declare permission for attribute '%@' twice!", _name]; } - (void)setDefaultAccess:(NSString *)_access { @@ -160,12 +159,11 @@ /* object security */ - (void)_logObjPermAlreadySet { - [self logWithFormat: - @"WARNING: tried to declare object permission twice! " - @"(perm=%@,private=%s,public=%s)", - self->objectPermission, - self->isObjectPrivate?"yes":"no", - self->isObjectPublic?"yes":"no"]; + [self warnWithFormat:@"tried to declare object permission twice! " + @"(perm=%@,private=%s,public=%s)", + self->objectPermission, + self->isObjectPrivate?"yes":"no", + self->isObjectPublic?"yes":"no"]; } - (BOOL)hasObjectProtections { @@ -235,8 +233,8 @@ self->defRoles = [[NSMutableDictionary alloc] initWithCapacity:8]; if ((tmp = [self->defRoles objectForKey:_per])) { - [self logWithFormat:@"WARNING: tried to set default role of '%@' twice!" - @" (set to %@)", _per, tmp]; + [self warnWithFormat:@"tried to set default role of '%@' twice!" + @" (set to %@)", _per, tmp]; return; } @@ -265,8 +263,8 @@ self->defRoles = [[NSMutableDictionary alloc] initWithCapacity:8]; if ((tmp = [self->defRoles objectForKey:_p])) { - [self logWithFormat:@"WARNING: tried to set default role of '%@' twice!" - @" (set to %@)", _p, tmp]; + [self warnWithFormat:@"tried to set default role of '%@' twice!" + @" (set to %@)", _p, tmp]; return; } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoComponent.m b/sope-appserver/NGObjWeb/SoObjects/SoComponent.m index ba79e5cc..499991bb 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoComponent.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoComponent.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: SoComponent.m 1 2004-08-20 10:08:27Z znek $ #include "SoComponent.h" #include "SoProductResourceManager.h" @@ -62,14 +62,14 @@ if (reg == nil) reg = [[SoProductRegistry sharedProductRegistry] retain]; if (reg == nil) - [self logWithFormat:@"ERROR: missing product registry!"]; + [self errorWithFormat:@"missing product registry!"]; if ((bundle = [self componentBundle]) == nil) - [self logWithFormat:@"WARNING: did not find bundle of component !"]; + [self warnWithFormat:@"did not find bundle of component !"]; if ((product = [reg productForBundle:bundle]) == nil) - [self logWithFormat: - @"WARNING: did not find product of component (bundle=%@)", bundle]; + [self warnWithFormat:@"did not find product of component (bundle=%@)", + bundle]; return product; } @@ -120,9 +120,8 @@ tmpl = [self templateWithName:[self name]]; if (tmpl == nil) { - [self logWithFormat: - @"WARNING: found not template named '%@' for component.", - [self name]]; + [self warnWithFormat:@"found not template named '%@' for component.", + [self name]]; } return tmpl; } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoObject+Traversal.m b/sope-appserver/NGObjWeb/SoObjects/SoObject+Traversal.m index 46f39214..e78eeb12 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoObject+Traversal.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoObject+Traversal.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: SoObject+Traversal.m 1 2004-08-20 10:08:27Z znek $ #include "SoObjectRequestHandler.h" #include "SoObject.h" @@ -367,9 +367,9 @@ static BOOL _isDebugOn(void) { return [self traversePathArray:_tp acquire:_acquire]; } - [self logWithFormat: - @"ERROR(%s): don't know how to turn path object %@ into an array", - __PRETTY_FUNCTION__, _tp]; + [self errorWithFormat: + @"(%s): don't know how to turn path object %@ into an array", + __PRETTY_FUNCTION__, _tp]; return nil; } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoObject.m b/sope-appserver/NGObjWeb/SoObjects/SoObject.m index b38e748e..09b9266f 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoObject.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoObject.m @@ -244,9 +244,9 @@ static void _initialize(void) { NSString *name; if (parent == self) { - [self logWithFormat: - @"WARNING: container==object in baseURL calculation (loop?): %@", - self]; + [self warnWithFormat: + @"container==object in baseURL calculation (loop?): %@", + self]; } baseURL = [parent baseURLInContext:_ctx]; @@ -306,10 +306,9 @@ static void _initialize(void) { if (port == 0) { static BOOL didWarn = NO; if (!didWarn) { - [self logWithFormat: - @"WARNING(%s:%i): got an empty port, probably buggy " - @"SOUP host header!", - __PRETTY_FUNCTION__, __LINE__]; + [self warnWithFormat:@"(%s:%i): got an empty port, probably buggy " + @"SOAP host header!", + __PRETTY_FUNCTION__, __LINE__]; didWarn = YES; } port = 23000; diff --git a/sope-appserver/NGObjWeb/SoObjects/SoObjectRequestHandler.m b/sope-appserver/NGObjWeb/SoObjects/SoObjectRequestHandler.m index f8af72cb..152e7272 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoObjectRequestHandler.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoObjectRequestHandler.m @@ -372,15 +372,15 @@ static NSString *rapidTurnAroundPath = nil; dpClass = [self->dispatcherRules valueForKey:@"dispatcher"]; rqType = [self->dispatcherRules valueForKey:@"requestType"]; if (debugRulesOn) { - [self debugWithFormat:@" selected dispatcher: %@", dpClass]; - [self debugWithFormat:@" selected rq-type: %@", rqType]; + [self debugWithFormat:@"selected dispatcher: %@", dpClass]; + [self debugWithFormat:@"selected rq-type: %@", rqType]; } /* create dispatcher */ if (rqType != nil) [_ctx setSoRequestType:rqType]; if ((dispatcher = NSClassFromString(dpClass)) == nil) { - [self logWithFormat:@"ERROR: did not find dispatcher class '%@'", dpClass]; + [self errorWithFormat:@"did not find dispatcher class '%@'", dpClass]; return nil; } @@ -398,7 +398,7 @@ static NSString *rapidTurnAroundPath = nil; NSEnumerator *e; id container; - [self debugWithFormat:@" render in ctx: %@", _ctx]; + [self debugWithFormat:@"render in ctx: %@", _ctx]; if ([_object isKindOfClass:[WOResponse class]]) /* already rendered ... */ @@ -417,7 +417,7 @@ static NSString *rapidTurnAroundPath = nil; if ((renderer = [container rendererForObject:_object inContext:_ctx])) { /* the container provided an own renderer for the object */ - [self debugWithFormat:@" use container renderer: %@", renderer]; + [self debugWithFormat:@"use container renderer: %@", renderer]; break; } } @@ -432,11 +432,11 @@ static NSString *rapidTurnAroundPath = nil; Class clazz; if ((clazz = NSClassFromString(rendererClass)) == Nil) { - [self logWithFormat:@"did not find class of selected renderer %@", + [self errorWithFormat:@"did not find class of selected renderer %@", rendererClass]; } else if ((renderer = [clazz sharedRenderer]) == nil) { - [self logWithFormat:@"could not get renderer of class %@", + [self errorWithFormat:@"could not get renderer of class %@", rendererClass]; } else if (![renderer canRenderObject:_object inContext:_ctx]) { @@ -447,11 +447,11 @@ static NSString *rapidTurnAroundPath = nil; } if (renderer) - [self debugWithFormat:@" use rule-selected renderer: %@", renderer]; + [self debugWithFormat:@"use rule-selected renderer: %@", renderer]; } if (renderer == nil) - [self debugWithFormat:@" found no renderer for object: %@", _object]; + [self debugWithFormat:@"found no renderer for object: %@", _object]; if ((error = [renderer renderObject:_object inContext:_ctx])) { if (renderer != [SoDefaultRenderer sharedRenderer]) { @@ -460,13 +460,13 @@ static NSString *rapidTurnAroundPath = nil; e2 = [(SoDefaultRenderer *)[SoDefaultRenderer sharedRenderer] renderObject:error inContext:_ctx]; if (e2) { - [self logWithFormat:@"default renderer could not render error %@: %@", - error, e2]; + [self errorWithFormat: + @"default renderer could not render error %@: %@", error, e2]; return nil; } } else { - [self logWithFormat:@"default renderer returned error: %@", error]; + [self errorWithFormat:@"default renderer returned error: %@", error]; return nil; } } @@ -491,7 +491,7 @@ static NSString *rapidTurnAroundPath = nil; if (debugOn) { [self debugWithFormat:@"request 0x%08X: %@ %@ (ctx=0x%08X)", _rq, [_rq method], [_rq uri], _ctx]; - if (_sn) [self debugWithFormat:@" session 0x%08X: %@", _sn, _sn]; + if (_sn) [self debugWithFormat:@"session 0x%08X: %@", _sn, _sn]; } /* setup rule context */ @@ -517,7 +517,7 @@ static NSString *rapidTurnAroundPath = nil; [self debugWithFormat:@"authenticator allowed request."]; } else { - [self debugWithFormat:@"WARNING: no authenticator available."]; + [self warnWithFormat:@"no authenticator available."]; } /* lookup object */ @@ -545,7 +545,7 @@ static NSString *rapidTurnAroundPath = nil; if ([object isKindOfClass:[NSException class]]) { /* exceptions are not called ... */ - [self debugWithFormat:@" not calling exception: %@", object]; + [self debugWithFormat:@"not calling exception: %@", object]; doDispatch = NO; } @@ -553,9 +553,9 @@ static NSString *rapidTurnAroundPath = nil; id dispatcher; dispatcher = [self dispatcherForObject:object inContext:_ctx]; - [self debugWithFormat:@" dispatcher: %@", dispatcher]; + [self debugWithFormat:@"dispatcher: %@", dispatcher]; - [self debugWithFormat:@" dispatch object: %@", object]; + [self debugWithFormat:@"dispatch object: %@", object]; object = [dispatcher dispatchInContext:_ctx]; if (object) [self->dispatcherRules takeValue:object forKey:@"result"]; @@ -564,7 +564,7 @@ static NSString *rapidTurnAroundPath = nil; /* render result */ if (object == nil) { - [self debugWithFormat:@" got an empty result !"]; + [self debugWithFormat:@"got an empty result !"]; r = [_ctx response]; [r setStatus:500]; [r appendContentString:@"the called object returned no result"]; @@ -572,19 +572,19 @@ static NSString *rapidTurnAroundPath = nil; else if ([object isKindOfClass:[WOResponse class]]) { r = object; [self debugWithFormat: - @" got response: 0x%08X (status=%i,len=%@,type=%@)", - r, [r status], - [r headerForKey:@"content-length"], - [r headerForKey:@"content-type"]]; + @"got response: 0x%08X (status=%i,len=%@,type=%@)", + r, [r status], + [r headerForKey:@"content-length"], + [r headerForKey:@"content-type"]]; } else { if (debugOn) { if ([object isKindOfClass:[NSData class]]) { - [self debugWithFormat:@" render data 0x%08X[len=%i]", + [self debugWithFormat:@"render data 0x%08X[len=%i]", object, [object length]]; } else - [self debugWithFormat:@" render object: %@", object]; + [self debugWithFormat:@"render object: %@", object]; } [self->dispatcherRules takeValue:object forKey:@"result"]; @@ -592,10 +592,10 @@ static NSString *rapidTurnAroundPath = nil; if (debugOn) { [self debugWithFormat: - @" made response: 0x%08X (status=%i,len=%@,type=%@)", - r, [r status], - [r headerForKey:@"content-length"], - [r headerForKey:@"content-type"]]; + @"made response: 0x%08X (status=%i,len=%@,type=%@)", + r, [r status], + [r headerForKey:@"content-length"], + [r headerForKey:@"content-type"]]; } } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoObjectSOAPDispatcher.m b/sope-appserver/NGObjWeb/SoObjects/SoObjectSOAPDispatcher.m index be8bade5..6570269a 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoObjectSOAPDispatcher.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoObjectSOAPDispatcher.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: SoObjectSOAPDispatcher.m 1 2004-08-20 10:08:27Z znek $ #include "SoObjectSOAPDispatcher.h" #include "SoObject.h" @@ -113,15 +113,15 @@ static BOOL debugParsing = NO; } if (methodObject == nil) { - [self debugWithFormat:@"WARNING: could not locate SOAP method: %@", - _actionName]; + [self warnWithFormat:@"could not locate SOAP method: %@", + _actionName]; return [NSException exceptionWithHTTPStatus:501 /* not implemented */ reason:@"did not find the specified SOAP method"]; } else if (![methodObject isCallable]) { - [self debugWithFormat: - @"WARNING: object found for SOAP method '%@' is not callable: " - @"%@", _actionName, methodObject]; + [self warnWithFormat: + @"object found for SOAP method '%@' is not callable: " + @"%@", _actionName, methodObject]; return [NSException exceptionWithHTTPStatus:501 /* not implemented */ reason:@"did not find the specified SOAP method"]; } @@ -177,8 +177,7 @@ static BOOL debugParsing = NO; list = [envelope getElementsByTagName:@"Header"]; // TODO: not yet supported by DOMElement: namespaceURI:XMLNS_SOAP_ENVELOPE]; if ([list length] > 1) { - [self logWithFormat: - @"WARNING: multiple SOAP headers in request?! (using first)"]; + [self warnWithFormat:@"multiple SOAP headers in request?! (using first)"]; } header = [list length] > 0 ? [list objectAtIndex:0] : nil; if (debugParsing) [self debugWithFormat:@"header: %@", header]; @@ -193,8 +192,7 @@ static BOOL debugParsing = NO; reason:@"could not parse SOAP body of request"]; } else if ([list length] > 1) { - [self logWithFormat: - @"WARNING: multiple SOAP bodies in request?! (using first)"]; + [self warnWithFormat:@"multiple SOAP bodies in request?! (using first)"]; } body = [list objectAtIndex:0]; if (debugParsing) [self debugWithFormat:@"body: %@", body]; @@ -217,7 +215,7 @@ static BOOL debugParsing = NO; pool = [[NSAutoreleasePool alloc] init]; if ((rq = [_ctx request]) == nil) { - [self logWithFormat:@"ERROR: missing request in context!"]; + [self errorWithFormat:@"missing request in context!"]; return nil; } @@ -228,7 +226,7 @@ static BOOL debugParsing = NO; SOAPAction = [rq headerForKey:@"soapaction"]; if ([SOAPAction length] == 0) { - [self logWithFormat:@"ERROR: missing SOAPAction HTTP header!"]; + [self errorWithFormat:@"missing SOAPAction HTTP header!"]; return nil; } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoObjectXmlRpcDispatcher.m b/sope-appserver/NGObjWeb/SoObjects/SoObjectXmlRpcDispatcher.m index 064cb0f7..a40ec9fa 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoObjectXmlRpcDispatcher.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoObjectXmlRpcDispatcher.m @@ -179,10 +179,10 @@ static BOOL debugOn = NO; } if ([_params count] > 0) { - [self logWithFormat: - @"WARNING: invoking SOPE method via XML-RPC without " - @"positional paramters (%i parameters defined): %@", - [_params count], method]; + [self warnWithFormat: + @"invoking SOPE method via XML-RPC without " + @"positional paramters (%i parameters defined): %@", + [_params count], method]; } return [method callOnObject:clientObject inContext:_ctx]; } @@ -269,8 +269,8 @@ static BOOL debugOn = NO; if (![XmlRpcMethodCall instancesRespondToSelector:@selector(initWithRequest:)]) { - [self logWithFormat: - @"ERROR: XmlRpcMethodCall does not respond to -initWithRequest:, " + [self errorWithFormat: + @"XmlRpcMethodCall does not respond to -initWithRequest:, " @"this method is part of libNGXmlRpc which you might want to link " @"against to get XML-RPC support."]; return [NSException exceptionWithHTTPStatus:501 /* Not Implemented */ diff --git a/sope-appserver/NGObjWeb/SoObjects/SoObjects.xcode/project.pbxproj b/sope-appserver/NGObjWeb/SoObjects/SoObjects.xcode/project.pbxproj index a40e24e4..35cf8112 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoObjects.xcode/project.pbxproj +++ b/sope-appserver/NGObjWeb/SoObjects/SoObjects.xcode/project.pbxproj @@ -289,7 +289,7 @@ ); buildSettings = { DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 4.5.84; + DYLIB_CURRENT_VERSION = 4.5.91; FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks"; FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = NO; diff --git a/sope-appserver/NGObjWeb/SoObjects/SoPageInvocation.m b/sope-appserver/NGObjWeb/SoObjects/SoPageInvocation.m index a78cec84..1b212a06 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoPageInvocation.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoPageInvocation.m @@ -184,8 +184,7 @@ static int debugOn = 0; inv->methodObject = [[inv instantiateMethodInContext:_ctx] retain]; if (inv->methodObject == nil) { - [self logWithFormat:@"ERROR: did not find method '%@'", - [self actionClassName]]; + [self errorWithFormat:@"did not find method '%@'", [self actionClassName]]; return nil; } return inv; diff --git a/sope-appserver/NGObjWeb/SoObjects/SoProduct.m b/sope-appserver/NGObjWeb/SoObjects/SoProduct.m index 76e41bf9..32bd75c2 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoProduct.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoProduct.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: SoProduct.m 1 2004-08-20 10:08:27Z znek $ #include "SoProduct.h" #include "SoProductClassInfo.h" @@ -149,9 +149,9 @@ static int loadDebugOn = 0; return; } if ([self->categories objectForKey:_name]) { - [self logWithFormat: - @"ERROR: duplicate declaration of category on '%@' in product.", - _name]; + [self errorWithFormat: + @"duplicate declaration of category on '%@' in product.", + _name]; [catInfo release]; return; } @@ -176,10 +176,9 @@ static int loadDebugOn = 0; return; } if ([self->classes objectForKey:_name]) { - [self logWithFormat: - @"ERROR: duplicate declaration of class %@ in product " - @"(registering as category)", - _name]; + [self errorWithFormat:@"duplicate declaration of class %@ in product " + @"(registering as category)", + _name]; [classInfo release]; [self registerCategoryNamed:_name info:_info]; return; @@ -331,7 +330,7 @@ static int loadDebugOn = 0; return [[WOApplication application] resourceManager]; if (self->resourceManager == nil) { - [self logWithFormat:@"WARNING: resource-manager was nil ..."]; + [self warnWithFormat:@"resource-manager was nil ..."]; self->resourceManager = [[SoProductResourceManager alloc] initWithProduct:self]; } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoProductClassInfo.m b/sope-appserver/NGObjWeb/SoObjects/SoProductClassInfo.m index 0145875d..b994d28d 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoProductClassInfo.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoProductClassInfo.m @@ -164,7 +164,7 @@ static int loadDebugOn = 0; /* if an implementation was provided, register it with the class */ if ([_soClass valueForSlot:slotName]) { - [self logWithFormat:@"WARNING: redefining slot '%@' of class '%@'", + [self warnWithFormat:@"redefining slot '%@' of class '%@'", slotName, _soClass]; } @@ -181,20 +181,20 @@ static int loadDebugOn = 0; NSException *error; if (_soClass == nil) { - [self logWithFormat:@"ERROR(%s): missing soClass parameter?!", + [self errorWithFormat:@"(%s): missing soClass parameter?!", __PRETTY_FUNCTION__]; return; } if (_registry == nil) { - [self logWithFormat:@"ERROR: missing registry ?!"]; + [self errorWithFormat:@"missing registry ?!"]; return; } e = [self->extensions objectEnumerator]; while ((ext = [e nextObject])) { if ((error = [_registry registerSoClass:_soClass forExtension:ext])) { - [self logWithFormat: - @"ERROR: failed to register class %@ for extension %@: %@", + [self errorWithFormat: + @"failed to register class %@ for extension %@: %@", [_soClass className], ext, error]; } else if (loadDebugOn) { @@ -206,8 +206,8 @@ static int loadDebugOn = 0; e = [self->exactFilenames objectEnumerator]; while ((ext = [e nextObject])) { if ((error = [_registry registerSoClass:_soClass forExactName:ext])) { - [self logWithFormat: - @"ERROR: failed to register class %@ for name %@: %@", + [self errorWithFormat: + @"failed to register class %@ for name %@: %@", [_soClass className], ext, error]; } else if (loadDebugOn) { @@ -222,14 +222,14 @@ static int loadDebugOn = 0; id security; if (_registry == nil) { - [self logWithFormat:@"WARNING(%s): did not pass a registry?!", - __PRETTY_FUNCTION__]; + [self warnWithFormat:@"(%s): did not pass a registry?!", + __PRETTY_FUNCTION__]; return; } if ((soClass = [_registry soClassWithName:[self className]]) == nil) { - [self logWithFormat: - @"ERROR: did not find exported SoClass '%@' in product %@!", + [self errorWithFormat: + @"did not find exported SoClass '%@' in product %@!", [self className], self->product]; return; } @@ -379,9 +379,9 @@ static int loadDebugOn = 0; SoSelectorInvocation *method; if (_config == nil) { - [self logWithFormat: - @"ERROR: missing config for selector invocation method: '%@'", - _name]; + [self errorWithFormat: + @"missing config for selector invocation method: '%@'", + _name]; return nil; } @@ -415,9 +415,9 @@ static int loadDebugOn = 0; selector = [config objectForKey:@"name"]; if ([selector length] == 0) { - [self logWithFormat: - @"ERROR: missing 'name' in selector config of method '%@': %@", - _name, _config]; + [self errorWithFormat: + @"missing 'name' in selector config of method '%@': %@", + _name, _config]; return nil; } @@ -431,8 +431,8 @@ static int loadDebugOn = 0; [method setArgumentSpecifications:argspecs]; } else { - [self logWithFormat:@"ERROR: cannot handle selector configuration: %@", - _config]; + [self errorWithFormat:@"cannot handle selector configuration: %@", + _config]; return nil; } return method; @@ -528,9 +528,9 @@ static int loadDebugOn = 0; // TODO: should we allow/use SoClasses here? if ((valueClass = NSClassFromString(valueClassName)) == Nil) { - [self logWithFormat: - @"ERROR: did not find value class '%@' for slot: '%@'", - valueClassName, _name]; + [self errorWithFormat: + @"did not find value class '%@' for slot: '%@'", + valueClassName, _name]; return NO; } } @@ -542,8 +542,8 @@ static int loadDebugOn = 0; value = [self instantiateObjectOfClass:valueClass withPlist:value]; if (value == nil) { - [self logWithFormat: - @"ERROR: could not initialize value of slot %@ with class %@", + [self errorWithFormat: + @"could not initialize value of slot %@ with class %@", _name, valueClassName]; return NO; } @@ -562,9 +562,9 @@ static int loadDebugOn = 0; value = [[[valueClass alloc] init] autorelease]; if (value == nil) { - [self logWithFormat: - @"ERROR: could not initialize value of slot '%@' with class: %@", - _name, valueClassName]; + [self errorWithFormat: + @"could not initialize value of slot '%@' with class: %@", + _name, valueClassName]; return NO; } } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m b/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m index eb433edb..1d5be88c 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoProductRegistry.m @@ -118,10 +118,9 @@ static int debugOn = 0; return; } else { - [self logWithFormat: - @"WARNING: no product object for first name '%@' " - @"(name=%@,bundle=%@)", - firstProductName, productName, bundlePath]; + [self warnWithFormat: + @"no product object for first name '%@' (name=%@,bundle=%@)", + firstProductName, productName, bundlePath]; } } @@ -319,8 +318,8 @@ static int debugOn = 0; while ((rqname = [requiredProducts nextObject])) { if (![self loadProductNamed:rqname]) { if ([rqname isEqualToString:@"MAIN"]) continue; - [self logWithFormat:@"ERROR: failed to load product %@ required by %@.", - rqname, _name]; + [self errorWithFormat:@"failed to load product %@ required by %@.", + rqname, _name]; return NO; } } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoProductResourceManager.m b/sope-appserver/NGObjWeb/SoObjects/SoProductResourceManager.m index eaead66d..de9e99d1 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoProductResourceManager.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoProductResourceManager.m @@ -93,15 +93,14 @@ static BOOL debugOn = NO; type:[_frameworkName pathExtension]]; } if (bundle == nil) { - [self debugWithFormat:@"WARNING: missing bundle for framework: '%@'", + [self warnWithFormat:@"missing bundle for framework: '%@'", _frameworkName]; goto fallback; } } else { if ((bundle = [self->product bundle]) == nil) { - [self debugWithFormat:@"WARNING: missing bundle for product: %@", - self->product]; + [self warnWithFormat:@"missing bundle for product: %@", self->product]; goto fallback; } } @@ -265,14 +264,14 @@ static BOOL debugOn = NO; inFramework:[b bundlePath] languages:languages]; if (p == nil) { - [self logWithFormat:@"ERROR: did not find product resource: %@", _key]; + [self errorWithFormat:@"did not find product resource: %@", _key]; return nil; } /* load data */ if ((data = [NSData dataWithContentsOfMappedFile:p]) == nil) { - [self logWithFormat:@"ERROR: failed to load product resource: %@", _key]; + [self errorWithFormat:@"failed to load product resource: %@", _key]; return nil; } @@ -284,9 +283,8 @@ static BOOL debugOn = NO; [r setContent:data]; if ((ctype = [self mimeTypeForExtension:pe]) == nil) { - [self logWithFormat: - @"WARNING: did not recognize extension '%@', " - @"delivering as application/octet-stream.", pe]; + [self warnWithFormat:@"did not recognize extension '%@', " + @"delivering as application/octet-stream.", pe]; ctype = @"application/octet-stream"; } diff --git a/sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.m b/sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.m index e16b3d90..a2559e16 100644 --- a/sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.m +++ b/sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.m @@ -104,12 +104,12 @@ static BOOL debugOn = NO; self->sel = sel_register_name(sname); #else /* TODO: not tested against this ObjC runtime */ - NSLog(@"WARNING(%s): not tested against this ObjC runtime, " - @"product bundle loading may be broken.", __PRETTY_FUNCTION__); + [self warnWithFormat:@"(%s): not tested against this ObjC runtime, " + @"product bundle loading may be broken.", __PRETTY_FUNCTION__]; #endif } if (self->sel == NULL) - [self logWithFormat:@"WARNING: did not find selector: %@", _name]; + [self warnWithFormat:@"did not find selector: %@", _name]; } - (void)setDoesAddContextParameter:(BOOL)_flag { @@ -156,7 +156,7 @@ static BOOL debugOn = NO; // TODO: I guess that should be improved a bit in the dispatcher if ((soapEnvelope = [_ctx valueForKey:@"SOAPEnvelope"]) == nil) { // TODO: generate some kind of fault? (NSException?) - [self logWithFormat:@"ERROR: no SOAP envelope available in context!"]; + [self errorWithFormat:@"no SOAP envelope available in context!"]; return nil; } @@ -182,8 +182,8 @@ static BOOL debugOn = NO; if ([_type isEqualToString:@"SOAP"]) return [self extractSOAPArgumentsFromContext:_ctx specification:_spec]; - [self logWithFormat: - @"ERROR: cannot extract parameters for request type: '%@'", _type]; + [self errorWithFormat: + @"cannot extract parameters for request type: '%@'", _type]; return nil; } @@ -306,7 +306,7 @@ static BOOL debugOn = NO; selector = [self selectorForNumberOfArguments:[args count]]; if (selector == NULL) { - [self logWithFormat:@"WARNING: missing selector for invocation!"]; + [self warnWithFormat:@"missing selector for invocation!"]; return [self noSelectorForArgumentCountError:[args count]]; } @@ -338,8 +338,8 @@ static BOOL debugOn = NO; if ([self doesAddContextParameter]) callArgCount++; if ((selector = [self selectorForNumberOfArguments:callArgCount]) == NULL) { - [self logWithFormat:@"WARNING: missing selector for invocation (args=%d)!", - callArgCount]; + [self warnWithFormat:@"missing selector for invocation (args=%d)!", + callArgCount]; return [self noSelectorForArgumentCountError:callArgCount]; } diff --git a/sope-appserver/NGObjWeb/Templates/WOApplication+Builders.m b/sope-appserver/NGObjWeb/Templates/WOApplication+Builders.m index 792e082d..9fe5a97c 100644 --- a/sope-appserver/NGObjWeb/Templates/WOApplication+Builders.m +++ b/sope-appserver/NGObjWeb/Templates/WOApplication+Builders.m @@ -48,13 +48,13 @@ continue; if ((bundle = [bm bundleWithPath:lPath]) == nil) { - [self logWithFormat:@"WARNING: could not get bundle for path: '%@'", - lPath]; + [self warnWithFormat:@"could not get bundle for path: '%@'", + lPath]; continue; } if (![bundle load]) { - [self logWithFormat:@"WARNING: could not load bundle: '%@'", lPath]; + [self warnWithFormat:@"could not load bundle: '%@'", lPath]; continue; } diff --git a/sope-appserver/NGObjWeb/Templates/WOComponentScriptPart.m b/sope-appserver/NGObjWeb/Templates/WOComponentScriptPart.m index 25370635..46daecc4 100644 --- a/sope-appserver/NGObjWeb/Templates/WOComponentScriptPart.m +++ b/sope-appserver/NGObjWeb/Templates/WOComponentScriptPart.m @@ -83,7 +83,7 @@ - (void)initScriptWithComponent:(WOComponent *)_object { #if 1 - [self logWithFormat:@"ERROR: cannot apply script on object: %@", _object]; + [self errorWithFormat:@"cannot apply script on object: %@", _object]; #else /* fixed on JavaScript, part should have a language ... */ NS_DURING { diff --git a/sope-appserver/NGObjWeb/Templates/WODParser.m b/sope-appserver/NGObjWeb/Templates/WODParser.m index 23cec76f..717ed337 100644 --- a/sope-appserver/NGObjWeb/Templates/WODParser.m +++ b/sope-appserver/NGObjWeb/Templates/WODParser.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: WODParser.m 1 2004-08-20 10:08:27Z znek $ #include "WODParser.h" #include "common.h" @@ -130,7 +130,8 @@ static NSString *_makeStringForBuffer(const unsigned char *_buf, unsigned _l) { } if ([_mappings objectForKey:elementName] != nil) - NSLog(@"WARNING: duplicate definition of element %@ !", elementName); + [self warnWithFormat:@"duplicate definition of element %@ !", + elementName]; def = [self elementDefinitionForComponent:componentName associations:entry diff --git a/sope-appserver/NGObjWeb/Templates/WOHTMLParser.m b/sope-appserver/NGObjWeb/Templates/WOHTMLParser.m index b8905f7f..87a0f4d9 100644 --- a/sope-appserver/NGObjWeb/Templates/WOHTMLParser.m +++ b/sope-appserver/NGObjWeb/Templates/WOHTMLParser.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: WOHTMLParser.m 1 2004-08-20 10:08:27Z znek $ #include "WOHTMLParser.h" #include @@ -442,7 +442,7 @@ static WOElement *_parseHashElement(NSZone *_zone, const char *_buffer, if ((name = _parseStringValue(_zone, _buffer, _idx,_len,_exc,self)) == nil) { #if HEAVY_DEBUG - NSLog(@"ERROR: got no name for hash tag '<#NAME>'"); + [self errorWithFormat:@"got no name for hash tag '<#NAME>'"]; #endif if (_exc) // if there was an error .. return nil; @@ -653,8 +653,9 @@ static WOElement *_parseWOElement(NSZone *_zone, const char *_buffer, attrs = _parseTagAttributes(_zone, _buffer, _idx, _len, _exception, self); if (attrs == nil) { - //NSLog(@"ERROR: got no attributes for WO tag (need at least 'NAME').."); - + //[self errorWithFormat: + // @"got no attributes for WO tag (need at least 'NAME').."]; + if (_exception) // if there was an error .. return nil; } @@ -872,14 +873,14 @@ static WOElement *_parseElement(NSZone *_zone, pos++; } if (pos >= _len) // EOF was reached - break; + break; } else { // skip '<', read usual tag pos++; if (pos >= _len) { // EOF was reached with opening '<' - NSLog(@"WARNING: reached EOF with '<' at end !"); - break; + [self warnWithFormat:@"reached EOF with '<' at end !"]; + break; } if (skipPlainTags) { diff --git a/sope-appserver/NGObjWeb/Templates/WOWrapperTemplateBuilder.m b/sope-appserver/NGObjWeb/Templates/WOWrapperTemplateBuilder.m index 333df3ff..9be3901d 100644 --- a/sope-appserver/NGObjWeb/Templates/WOWrapperTemplateBuilder.m +++ b/sope-appserver/NGObjWeb/Templates/WOWrapperTemplateBuilder.m @@ -159,12 +159,12 @@ static NSStringEncoding parserEncoding; NSData *d; if ((s = [[NSString alloc] initWithData:_data encoding:_from]) == nil) { - [self logWithFormat:@"ERROR: template file has incorrect encoding!"]; + [self errorWithFormat:@"template file has incorrect encoding!"]; return _data; } if ((d = [s dataUsingEncoding:_to]) == nil) { - [self logWithFormat: - @"ERROR: could not represent template file in parser encoding!"]; + [self errorWithFormat: + @"could not represent template file in parser encoding!"]; return _data; } return d; @@ -363,8 +363,8 @@ static NSStringEncoding parserEncoding; // TODO: move to an NSString category, isn't there a method for this in // Foundation?! if ((encoding = [self encodingForString:tmp]) == 0) { - [self logWithFormat: - @"ERROR(%s): cannot deal with template encoding: '%@'", + [self errorWithFormat: + @"(%s): cannot deal with template encoding: '%@'", __PRETTY_FUNCTION__, tmp]; encoding = parserEncoding; } @@ -470,8 +470,8 @@ static NSStringEncoding parserEncoding; associations:nil contentElements:_subElements]; if (element == nil) { - [self logWithFormat: - @"ERROR: could not instantiate child component reference."]; + [self errorWithFormat: + @"could not instantiate child component reference."]; } return element; @@ -487,8 +487,8 @@ static NSStringEncoding parserEncoding; WODynamicElement *element; if ((def = [self->definitions objectForKey:_element]) == nil) { - [self logWithFormat: - @"ERROR: did not find definition of dynamic element '%@'", + [self errorWithFormat: + @"did not find definition of dynamic element '%@'", _element]; return [[NSClassFromString(@"WONoContentElement") alloc] initWithElementName:_element @@ -514,8 +514,8 @@ static NSStringEncoding parserEncoding; associations:assoc contentElements:_subElements]; if (element == nil) { - NSLog(@"ERROR: could not instantiate dynamic element of class %@", - NSStringFromClass(elementClass)); + [self errorWithFormat:@"could not instantiate dynamic element of class %@", + NSStringFromClass(elementClass)]; } if ([assoc count] > 0) { if (logExtraAssociations) diff --git a/sope-appserver/NGObjWeb/Templates/WOxComponentElemBuilder.m b/sope-appserver/NGObjWeb/Templates/WOxComponentElemBuilder.m index 8ecf0224..def131a9 100644 --- a/sope-appserver/NGObjWeb/Templates/WOxComponentElemBuilder.m +++ b/sope-appserver/NGObjWeb/Templates/WOxComponentElemBuilder.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: WOxComponentElemBuilder.m 1 2004-08-20 10:08:27Z znek $ #include @@ -58,12 +58,16 @@ @implementation WOxComponentElemBuilder -static BOOL debugOn = NO; +static NGLogger *debugLogger = nil; + (void)initialize { - NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; - debugOn = - [[ud objectForKey:@"WOxComponentElemBuilderDebugEnabled"] boolValue]; + NGLoggerManager *lm; + static BOOL didInit = NO; + if (didInit) + return; + didInit = YES; + lm = [NGLoggerManager defaultLoggerManager]; + debugLogger = [lm loggerForDefaultKey:@"WOxComponentElemBuilderDebugEnabled"]; } /* extracting associations */ @@ -102,8 +106,8 @@ static BOOL debugOn = NO; if (LiveChildRefClass == Nil) LiveChildRefClass = NSClassFromString(@"WOComponentReference"); - if (debugOn) - [self debugWithFormat:@"build component-reference: %@",_element]; + if (debugLogger) + [debugLogger debugWithFormat:@"build component-reference: %@", _element]; value = [_element attribute:@"value" namespaceURI:XMLNS_OD_BIND]; if ([value length] == 0) return nil; @@ -123,17 +127,18 @@ static BOOL debugOn = NO; /* build element */ - if (debugOn) { - [self debugWithFormat: - @" create reference for keypath: '%@': children=%@, assocs=%@", - value, children, assocs]; + if (debugLogger) { + [debugLogger debugWithFormat: + @"create reference for keypath: '%@': children=%@, " + @"assocs=%@", + value, children, assocs]; } de = [[LiveChildRefClass alloc] initWithName:[_b uniqueIDForNode:_element] associations:assocs contentElements:children]; - if (debugOn) [self debugWithFormat:@" built: %@", de]; + if (debugLogger) [debugLogger debugWithFormat:@"built: %@", de]; return de; } @@ -191,7 +196,7 @@ static BOOL debugOn = NO; NSString *compName; if (![[_element namespaceURI] isEqualToString:XMLNS_OD_BIND]) { - if (debugOn) { + if (debugLogger) { [self debugWithFormat: @"do not process element, not in bind namespace: %@", _element]; } @@ -238,15 +243,16 @@ static BOOL debugOn = NO; _element, _element]; } - if (debugOn) - [self debugWithFormat:@"creating static component reference: %@",_element]; - + if (debugLogger) + [debugLogger debugWithFormat:@"creating static component reference: %@", + _element]; + if (ChildRefClass == Nil) ChildRefClass = NSClassFromString(@"WOChildComponentReference"); cid = [_b uniqueIDForNode:_element]; - if (debugOn) - [self debugWithFormat:@"BUILD Component(%@): %@", cid, _element]; + if (debugLogger) + [debugLogger debugWithFormat:@"BUILD Component(%@): %@", cid, _element]; /* construct child elements */ @@ -259,8 +265,8 @@ static BOOL debugOn = NO; bindings = [self associationsForAttributes:[_element attributes] templateBuilder:_b]; - if (debugOn) - [self debugWithFormat:@" using bindings: %@", bindings]; + if (debugLogger) + [debugLogger debugWithFormat:@"using bindings: %@", bindings]; [_b registerSubComponentWithId:cid componentName:compName @@ -275,7 +281,7 @@ static BOOL debugOn = NO; /* debugging */ - (BOOL)isDebuggingEnabled { - return debugOn; + return debugLogger != nil; } @end /* WOxComponentElemBuilder */ diff --git a/sope-appserver/NGObjWeb/Templates/WOxElemBuilder.m b/sope-appserver/NGObjWeb/Templates/WOxElemBuilder.m index 9f152d69..edfef56c 100644 --- a/sope-appserver/NGObjWeb/Templates/WOxElemBuilder.m +++ b/sope-appserver/NGObjWeb/Templates/WOxElemBuilder.m @@ -94,46 +94,59 @@ @implementation WOxElemBuilder -static Class StrClass = Nil; -static Class AStrClass = Nil; +static Class StrClass = Nil; +static Class AStrClass = Nil; static NSDictionary *defaultAssocMap = nil; -static Class ValAssoc = Nil; +static Class ValAssoc = Nil; static BOOL logAssocMap = NO; static BOOL logAssocCreation = NO; static BOOL debugOn = NO; +static NGLogger *logger = nil; + (int)version { return 1; } + (void)initialize { - NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; + NSUserDefaults *ud; + NGLoggerManager *lm; static BOOL didInit = NO; + if (didInit) return; didInit = YES; - + + ud = [NSUserDefaults standardUserDefaults]; + lm = [NGLoggerManager defaultLoggerManager]; + + logger = [lm loggerForClass:self]; + [logger setLogLevel:[WOApplication isDebuggingEnabled] ? NGLogLevelDebug + : NGLogLevelInfo]; + StrClass = NSClassFromString(@"_WOSimpleStaticString"); if (StrClass == Nil) - NSLog(@"ERROR: missing class _WOSimpleStaticString !"); + [logger errorWithFormat:@"missing class _WOSimpleStaticString !"]; AStrClass = NSClassFromString(@"_WOSimpleStaticASCIIString"); if (AStrClass == Nil) - NSLog(@"ERROR: missing class _WOSimpleStaticASCIIString !"); + [logger errorWithFormat:@"missing class _WOSimpleStaticASCIIString !"]; logAssocMap = [ud boolForKey:@"WOxElemBuilder_LogAssociationMapping"]; logAssocCreation = [ud boolForKey:@"WOxElemBuilder_LogAssociationCreation"]; - if (logAssocMap) NSLog(@"Note: association mapping is logged!"); - if (logAssocCreation) NSLog(@"Note: association creation is logged!"); - + if (logAssocMap) + [logger logWithFormat:@"association mapping is logged!"]; + if (logAssocCreation) + [logger logWithFormat:@"association creation is logged!"]; + defaultAssocMap = [[ud dictionaryForKey:@"WOxAssociationClassMapping"] copy]; if (defaultAssocMap == nil) - NSLog(@"WARNING: WOxAssociationClassMapping default is not set!"); + [logger warnWithFormat: + @"WOxAssociationClassMapping default is not set!"]; if (ValAssoc == Nil) ValAssoc = NSClassFromString(@"WOValueAssociation"); } + (WOxElemBuilder *)createBuilderQueue:(NSArray *)_classNames { - unsigned i, count; + unsigned i, count; WOxElemBuilder *first, *current = nil; NSMutableArray *missingBuilders = nil; @@ -383,21 +396,20 @@ static BOOL debugOn = NO; c = [self associationClassForNamespaceURI:[_attribute namespaceURI]]; if (c == Nil) { - [self logWithFormat: - @"WARNING, found no association class for " - @"attribute %@ (namespace=%@)", + [self warnWithFormat: + @"found no association class for attribute %@ (namespace=%@)", _attribute, [_attribute namespaceURI]]; return nil; } if (logAssocMap) { [self logWithFormat:@"use class %@ for namespaceURI %@ (attribute %@)", - c, [_attribute namespaceURI], [_attribute name]]; + c, [_attribute namespaceURI], [_attribute name]]; } assoc = [[c alloc] initWithString:value]; if (logAssocCreation) { [self logWithFormat:@"created assoc %@ for attribute %@", - assoc, [_attribute name]]; + assoc, [_attribute name]]; } return [assoc autorelease]; @@ -448,7 +460,7 @@ static BOOL debugOn = NO; clazz = NSClassFromString(className); if (clazz == Nil) { - [self logWithFormat:@"WARNING: did not find association class: '%@'", + [self warnWithFormat:@"did not find association class: '%@'", className]; continue; } @@ -530,6 +542,13 @@ static BOOL debugOn = NO; /* logging */ ++ (id)logger { + return logger; +} +- (id)logger { + return logger; +} + - (void)logWithFormat:(NSString *)_format, ... { NSString *value = nil; va_list ap; diff --git a/sope-appserver/NGObjWeb/Templates/common.h b/sope-appserver/NGObjWeb/Templates/common.h index 434addde..c407f79d 100644 --- a/sope-appserver/NGObjWeb/Templates/common.h +++ b/sope-appserver/NGObjWeb/Templates/common.h @@ -29,8 +29,8 @@ # include #define IS_DEPRECATED \ - NSLog(@"WARNING: used deprecated method: %s:%i.", \ - __PRETTY_FUNCTION__, __LINE__); + [self warnWithFormat:@"used deprecated method: %s:%i.", \ + __PRETTY_FUNCTION__, __LINE__]; @interface NSException(NGObjWeb_Templates_setUserInfo) - (id)setReason:(NSString *)_reason; diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 6f8d2f66..983af6cd 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,8 +1,9 @@ # version file -SUBMINOR_VERSION:=90 +SUBMINOR_VERSION:=91 -# v4.5.84 required libNGExtensions v4.5.127 +# v4.5.91 requires libNGExtensions v4.5.134 +# v4.5.84 requires libNGExtensions v4.5.127 # v4.3.42 requires libNGExtensions v4.3.116 # v4.3.40 requires libNGExtensions v4.3.115 # v4.2.413 requires libSaxObjC v4.2.33 diff --git a/sope-appserver/NGObjWeb/WEClientCapabilities.m b/sope-appserver/NGObjWeb/WEClientCapabilities.m index 6c5b45cc..c037a3dd 100644 --- a/sope-appserver/NGObjWeb/WEClientCapabilities.m +++ b/sope-appserver/NGObjWeb/WEClientCapabilities.m @@ -841,7 +841,7 @@ static NSString *WEClientDetectorFormName = @"WEClientDetect"; - (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx { if (![_ctx isInForm]) { [[_ctx component] - logWithFormat:@"WARNING: you must use %@ inside a form !", + warnWithFormat:@"you must use %@ inside a form !", NSStringFromClass([self class])]; return; } diff --git a/sope-appserver/NGObjWeb/WOApplication.m b/sope-appserver/NGObjWeb/WOApplication.m index 85b496d2..19d76130 100644 --- a/sope-appserver/NGObjWeb/WOApplication.m +++ b/sope-appserver/NGObjWeb/WOApplication.m @@ -38,6 +38,7 @@ #include @interface WOApplication(PrivateMethods) ++ (id)logger; - (id)_loadComponentDefinitionWithName:(NSString *)_name language:(NSArray *)_langs; - (NSDictionary *)memoryStatistics; @@ -68,11 +69,11 @@ static NSString *rapidTurnAroundPath = nil; c = [(id)clazz performSelector:@selector(defaultSNSConnection)]; if (c == nil) { - [self logFatalWithFormat:@"could not connect SNS, exiting .."]; + [[self logger] fatalWithFormat:@"could not connect SNS, exiting .."]; exit(20); } - [self logInfoWithFormat:@"SNS enabled"]; + [[self logger] logWithFormat:@"SNS enabled"]; } + (void)_initializeWOApp { @@ -98,7 +99,7 @@ static NSString *rapidTurnAroundPath = nil; if ([ud boolForKey:@"WOContactSNS"]) [self _setupSNS]; else - [self logInfoWithFormat:@"SNS support disabled."]; + [[self logger] logWithFormat:@"SNS support disabled."]; NSDateClass = [NSDate class]; WOTemplateClass = [WOTemplate class]; @@ -226,7 +227,7 @@ static NSString *rapidTurnAroundPath = nil; e = [keys objectEnumerator]; while((key = [e nextObject]) != nil) { if ([key hasPrefix:@"WO"] || [key isEqualToString:@"NSProjectSearchPath"]) - [self logInfoWithFormat:@"[default]: %@ = %@", + [self logWithFormat:@"[default]: %@ = %@", key, [[ud objectForKey:key] description]]; } @@ -345,7 +346,7 @@ static NSString *rapidTurnAroundPath = nil; - (void)processHupSignal:(int)_signal { /* this isn't called immediatly */ - [self logInfoWithFormat:@"terminating on SIGHUP ..."]; + [self logWithFormat:@"terminating on SIGHUP ..."]; [self terminate]; } @@ -364,7 +365,7 @@ static NSString *rapidTurnAroundPath = nil; if (self->path == nil) { if ((self->path = [[self _lookupAppPath] copy]) == nil) { - [self logDebugWithFormat:@"could not find wrapper of application !"]; + [self debugWithFormat:@"could not find wrapper of application !"]; missingPath = YES; return nil; } @@ -407,11 +408,11 @@ static NSString *rapidTurnAroundPath = nil; NSDictionary *td; if ((t = [NSThread currentThread]) == nil) { - [self logErrorWithFormat:@"missing current thread !!!"]; + [self errorWithFormat:@"missing current thread !!!"]; return nil; } if ((td = [t threadDictionary]) == nil) { - [self logErrorWithFormat: + [self errorWithFormat: @"missing current thread's dictionary (thread=%@) !!!", t]; return nil; @@ -553,7 +554,7 @@ static NSString *rapidTurnAroundPath = nil; - (WOSession *)createSessionForRequest:(WORequest *)_request { if ([self respondsToSelector:@selector(createSession)]) { /* call deprecated method */ - [self logWarnWithFormat:@"calling deprecated -createSession .."]; + [self warnWithFormat:@"calling deprecated -createSession .."]; return [self createSession]; } else { @@ -575,7 +576,7 @@ static NSString *rapidTurnAroundPath = nil; if ([self respondsToSelector:@selector(restoreSession)]) { /* call deprecated method */ - [self logWarnWithFormat:@"calling deprecated -restoreSession .."]; + [self warnWithFormat:@"calling deprecated -restoreSession .."]; return [self restoreSession]; } @@ -583,7 +584,7 @@ static NSString *rapidTurnAroundPath = nil; WOSessionStore *store; if ((store = [self sessionStore]) == nil) { - [self logErrorWithFormat:@"missing session store ..."]; + [self errorWithFormat:@"missing session store ..."]; } else { session = [store restoreSessionWithID:_sid request:[_ctx request]]; @@ -612,7 +613,7 @@ static NSString *rapidTurnAroundPath = nil; if ([sid respondsToSelector:@selector(objectEnumerator)]) { NSEnumerator *e; - [self logErrorWithFormat:@"got multiple session IDs !"]; + [self errorWithFormat:@"got multiple session IDs !"]; e = [sid objectEnumerator]; while ((_sid = [e nextObject])) { @@ -622,7 +623,7 @@ static NSString *rapidTurnAroundPath = nil; if ((session = [self restoreSessionWithID:_sid inContext:_ctx])) return session; - //NSLog(@"WARNING: did not find session for sid %@", _sid); + //[self warnWithFormat:@"did not find session for sid %@", _sid); } } } @@ -637,7 +638,7 @@ static NSString *rapidTurnAroundPath = nil; if ([self respondsToSelector:@selector(saveSession:)]) { /* call deprecated method */ - [self logWarnWithFormat:@"calling deprecated -saveSession: .."]; + [self warnWithFormat:@"calling deprecated -saveSession: .."]; [self saveSession:[_ctx session]]; return; } @@ -657,7 +658,7 @@ static NSString *rapidTurnAroundPath = nil; if (perfLogger) { NSTimeInterval rt; rt = [[NSDateClass date] timeIntervalSince1970] - startSnSleep; - [perfLogger logInfoWithFormat:@"[woapp]: session -sleep took %4.3fs.", + [perfLogger logWithFormat:@"[woapp]: session -sleep took %4.3fs.", rt < 0.0 ? -1.0 : rt]; } @@ -676,7 +677,7 @@ static NSString *rapidTurnAroundPath = nil; if (perfLogger) { NSTimeInterval rt; rt = [[NSDateClass date] timeIntervalSince1970] - startStore; - [perfLogger logInfoWithFormat:@"[woapp]: storing sn in store took %4.3fs.", + [perfLogger logWithFormat:@"[woapp]: storing sn in store took %4.3fs.", rt < 0.0 ? -1.0 : rt]; } } @@ -685,7 +686,7 @@ static NSString *rapidTurnAroundPath = nil; if (perfLogger) { NSTimeInterval rt; rt = [[NSDateClass date] timeIntervalSince1970] - startSave; - [perfLogger logInfoWithFormat:@"[woapp]: saveSessionForContext took %4.3fs.", + [perfLogger logWithFormat:@"[woapp]: saveSessionForContext took %4.3fs.", rt < 0.0 ? -1.0 : rt]; } } @@ -754,11 +755,11 @@ static NSString *rapidTurnAroundPath = nil; #endif if ([self respondsToSelector:@selector(handleSessionCreationError)]) { - [self logWarnWithFormat:@"called deprecated -handleSessionCreationError method"]; + [self warnWithFormat:@"called deprecated -handleSessionCreationError method"]; return [self handleSessionCreationError]; } - [self logErrorWithFormat:@"could not create session for context %@", _ctx]; + [self errorWithFormat:@"could not create session for context %@", _ctx]; [response setStatus:200]; [response appendContentString:@"

Session Creation Error

\n
"];
@@ -784,12 +785,12 @@ static NSString *rapidTurnAroundPath = nil;
 
 - (WOResponse *)handleSessionRestorationErrorInContext:(WOContext *)_ctx {
   if ([self respondsToSelector:@selector(handleSessionRestorationError)]) {
-    [self logWarnWithFormat:@"calling deprecated "
+    [self warnWithFormat:@"calling deprecated "
                             @"-handleSessionRestorationError method"];
     return [self handleSessionRestorationError];
   }
   
-  [self logErrorWithFormat:@"could not restore session for context %@", _ctx];
+  [self errorWithFormat:@"could not restore session for context %@", _ctx];
   return nil;
 }
 
@@ -817,7 +818,7 @@ static NSString *rapidTurnAroundPath = nil;
 
 #if 0 && DEBUG
     if ([(p = [self path]) length] > 0)
-      [self logDebugWithFormat:@"setup WOResourceManager at path '%@' ...", p];
+      [self debugWithFormat:@"setup WOResourceManager at path '%@' ...", p];
 #else
     p = [self path];
 #endif
@@ -940,11 +941,11 @@ static NSString *rapidTurnAroundPath = nil;
   Class     dynamicElementClass = NSClassFromString(_name);
 
   if (dynamicElementClass == Nil) {
-    [self logWarnWithFormat:@"did not find dynamic element class %@ !", _name];
+    [self warnWithFormat:@"did not find dynamic element class %@ !", _name];
     return nil;
   }
   if (![dynamicElementClass isDynamicElement]) {
-    [self logWarnWithFormat:@"class %@ is not a dynamic element class !", _name];
+    [self warnWithFormat:@"class %@ is not a dynamic element class !", _name];
     return nil;
   }
   
@@ -1047,8 +1048,8 @@ static NSString *rapidTurnAroundPath = nil;
              [[start objectForKey:@"VmSize"] intValue];
     lib    = [[stop objectForKey:@"VmLib"] intValue] -
              [[start objectForKey:@"VmLib"] intValue];
-    [self logDebugWithFormat:@"loaded component %@; rss=%i vm=%i lib=%i.",
-      _name, rss,vmsize,lib];
+    [self debugWithFormat:@"loaded component %@; rss=%i vm=%i lib=%i.",
+            _name, rss,vmsize,lib];
   }
 #endif
   
@@ -1077,7 +1078,7 @@ static NSString *rapidTurnAroundPath = nil;
 }
 
 - (WOResponse *)handlePageRestorationErrorInContext:(WOContext *)_ctx {
-  [self logErrorWithFormat:
+  [self errorWithFormat:
           @"could not restore page for context-id %@\n  in context %@",
           [_ctx currentElementID], _ctx];
   
@@ -1098,7 +1099,7 @@ static NSString *rapidTurnAroundPath = nil;
   WOResponse *r  = nil;
   
   if ([self respondsToSelector:@selector(handleException:)]) {
-    [self logWarnWithFormat:@"calling deprecated -handleException method !"];
+    [self warnWithFormat:@"calling deprecated -handleException method !"];
     return [self handleException:_exc];
   }
   
@@ -1111,21 +1112,21 @@ static NSString *rapidTurnAroundPath = nil;
 	? 1 : 0;
     }
     if (doCore) {
-      [self logFatalWithFormat:@"%@: caught (ctx=%@):\n  %@.",
-	    self, _ctx, _exc];
+      [self fatalWithFormat:@"%@: caught (ctx=%@):\n  %@.",
+              self, _ctx, _exc];
       abort();
     }
   }
 #endif
   
   if (_ctx == nil) {
-    [self logFatalWithFormat:@"%@: caught (without context):\n  %@.",
-                             self, _exc];
+    [self fatalWithFormat:@"%@: caught (without context):\n  %@.",
+            self, _exc];
     [self terminate];
   }
   else if (rq == nil) {
-    [self logFatalWithFormat:@"%@: caught (without request):\n  %@.",
-                             self, _exc];
+    [self fatalWithFormat:@"%@: caught (without request):\n  %@.",
+            self, _exc];
     [self terminate];
   }
   else {
@@ -1143,7 +1144,7 @@ static NSString *rapidTurnAroundPath = nil;
     NSString *str = nil;
     NSString *bt  = nil;
     
-    [self logErrorWithFormat:@"%@: caught:\n  %@\nin context:\n  %@.",
+    [self errorWithFormat:@"%@: caught:\n  %@\nin context:\n  %@.",
             self, _exc, _ctx];
 
 #if LIB_FOUNDATION_LIBRARY
@@ -1152,7 +1153,7 @@ static NSString *rapidTurnAroundPath = nil;
 #endif
     
     if ((r = [WOResponse responseWithRequest:rq]) == nil)
-      [self logErrorWithFormat:@"could not create response !"];
+      [self errorWithFormat:@"could not create response !"];
     
     [r setHeader:@"text/html" forKey:@"content-type"];
     [r setHeader:@"no-cache" forKey:@"cache-control"];
@@ -1227,7 +1228,7 @@ static NSString *rapidTurnAroundPath = nil;
 
 #if !LIB_FOUNDATION_LIBRARY
 - (id)valueForUndefinedKey:(NSString *)_key {
-  [self logWarnWithFormat:@"tried to access undefined KVC key: '%@'",
+  [self warnWithFormat:@"tried to access undefined KVC key: '%@'",
 	  _key];
   return nil;
 }
diff --git a/sope-appserver/NGObjWeb/WOChildComponentReference.m b/sope-appserver/NGObjWeb/WOChildComponentReference.m
index 3dadbd1e..adfdfcf6 100644
--- a/sope-appserver/NGObjWeb/WOChildComponentReference.m
+++ b/sope-appserver/NGObjWeb/WOChildComponentReference.m
@@ -18,7 +18,7 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
+// $Id: WOChildComponentReference.m 1 2004-08-20 10:08:27Z znek $
 
 #include "WOChildComponentReference.h"
 #include "WOComponent+private.h"
@@ -92,14 +92,14 @@ static Class NSDateClass = Nil;
   NSTimeInterval st = 0.0;
   
   if ((parent = [_ctx component]) == nil) {
-    [self logWithFormat:
-            @"WARNING(%s): did not find parent component of child %@",
+    [self warnWithFormat:
+            @"%s: did not find parent component of child %@",
             __PRETTY_FUNCTION__, self->childName];
     return;
   }
   if ((child = [parent childComponentWithName:self->childName]) == nil) {
-    [self logWithFormat:
-            @"WARNING: did not find child component %@ of parent %@",
+    [self warnWithFormat:
+            @"did not find child component %@ of parent %@",
             self->childName, [parent name]];
     return;
   }
@@ -129,14 +129,14 @@ static Class NSDateClass = Nil;
 
   if ((parent = [_ctx component]) == nil) {
     [[_ctx session]
-           logWithFormat:@"WARNING: did not find parent component of child %@",
+           warnWithFormat:@"did not find parent component of child %@",
              self->childName];
     return nil;
   }
   if ((child = [parent childComponentWithName:self->childName]) == nil) {
     [[_ctx session]
-           logWithFormat:
-             @"WARNING: did not find child component %@ of parent %@",
+           warnWithFormat:
+             @"did not find child component %@ of parent %@",
              self->childName, [parent name]];
     return nil;
   }
@@ -166,14 +166,14 @@ static Class NSDateClass = Nil;
   NSTimeInterval st = 0.0;
   
   if ((parent = [_ctx component]) == nil) {
-    [self logWithFormat:
-            @"WARNING(%s): did not find parent component of child %@",
+    [self warnWithFormat:
+            @"%s: did not find parent component of child %@",
             __PRETTY_FUNCTION__, self->childName];
     return;
   }
   if ((child = [parent childComponentWithName:self->childName]) == nil) {
-    [self logWithFormat:
-            @"WARNING: did not find child component %@ of parent %@",
+    [self warnWithFormat:
+            @"did not find child component %@ of parent %@",
             self->childName, [parent name]];
     [_response appendContentString:@"
[missing component: "];
     [_response appendContentHTMLString:self->childName];
diff --git a/sope-appserver/NGObjWeb/WOComponent.m b/sope-appserver/NGObjWeb/WOComponent.m
index 9b91bba0..6dca0b72 100644
--- a/sope-appserver/NGObjWeb/WOComponent.m
+++ b/sope-appserver/NGObjWeb/WOComponent.m
@@ -53,7 +53,9 @@
 
 static Class NSDateClass      = Nil;
 static Class WOComponentClass = Nil;
-static BOOL  profElements                      = NO;
+
+static NGLogger *perfLogger                    = nil;
+
 static BOOL  debugOn                           = NO;
 static BOOL  debugComponentAwake               = NO;
 static BOOL  debugTemplates                    = NO;
@@ -66,19 +68,23 @@ static BOOL  wakeupPageOnCreation              = NO;
   return [super version] + 0 /* v2 */;
 }
 + (void)initialize {
-  NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
+  NSUserDefaults  *ud;
+  NGLoggerManager *lm;
   static BOOL didInit = NO;
+
   if (didInit) return;
   didInit = YES;
   
   NSAssert2([super version] == 2,
             @"invalid superclass (%@) version %i !",
             NSStringFromClass([self superclass]), [super version]);
-  
-  WOComponentClass = [WOComponent class];
-  NSDateClass      = [NSDate class];
-  
-  profElements        = [ud boolForKey:@"WOProfileElements"];
+
+  ud = [NSUserDefaults standardUserDefaults];
+  lm = [NGLoggerManager defaultLoggerManager];
+
+  WOComponentClass    = [WOComponent class];
+  NSDateClass         = [NSDate class];
+  perfLogger          = [lm loggerForDefaultKey:@"WOProfileElements"];
   debugOn             = [WOApplication isDebuggingEnabled];
   debugComponentAwake = [ud boolForKey:@"WODebugComponentAwake"];
   abortOnAwakeComponentInCtxDealloc = 
@@ -132,8 +138,8 @@ static BOOL  wakeupPageOnCreation              = NO;
     if (self->context)
       [self ensureAwakeInContext:self->context];
     else {
-      [self logWithFormat:
-              @"WARNING: no context given to -initWithContext: ..."];
+      [self warnWithFormat:
+              @"no context given to -initWithContext: ..."];
     }
   }
   return self;
@@ -189,9 +195,9 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
 #endif
   
   if (self->componentFlags.isAwake) {
-    [self logWithFormat:
-            @"WARNING: session will dealloc, "
-	    @"but component 0x%08X is awake (ctx=%@) !", self, self->context];
+    [self warnWithFormat:
+            @"session will dealloc, but component 0x%08X is awake (ctx=%@) !",
+            self, self->context];
     [self _sleepWithContext:self->context];
   }
   
@@ -220,8 +226,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
             the event?!
     */
     [self debugWithFormat:
-            @"WARNING: context %@ will dealloc, "
-            @"but component is awake in ctx %@!",
+            @"context %@ will dealloc, but component is awake in ctx %@!",
             [_notification object], [self->context contextID]];
     if (abortOnAwakeComponentInCtxDealloc)
       abort();
@@ -240,12 +245,12 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
 - (void)sleep {
   if (debugOn) {
     if (self->componentFlags.isAwake) {
-      [self debugWithFormat:
-              @"WARNING: component should not be awake if sleep is called !"];
+      [self warnWithFormat:
+              @"component should not be awake if sleep is called !"];
     }
     if (self->context == nil) {
-      [self debugWithFormat:
-              @"WARNING: context should not be nil if sleep is called !"];
+      [self warnWithFormat:
+              @"context should not be nil if sleep is called !"];
     }
   }
   
@@ -261,7 +266,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
 #endif
   
   if (debugComponentAwake) 
-    [self logWithFormat:@"0x%08X ensureAwakeInContext:0x%08X", self, _ctx];
+    [self debugWithFormat:@"0x%08X ensureAwakeInContext:0x%08X", self, _ctx];
   
   if (self->context == nil)     [self _setContext:_ctx];
   if (self->application == nil) self->application = [_ctx application];
@@ -293,13 +298,13 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
 }
 - (void)_sleepWithContext:(WOContext *)_ctx {
   if (debugComponentAwake) 
-    [self logWithFormat:@"0x%08X _sleepWithContext:0x%08X", self, _ctx];
+    [self debugWithFormat:@"0x%08X _sleepWithContext:0x%08X", self, _ctx];
   
   if (_ctx != self->context) {
     if ((self->context != nil) && (_ctx != nil)) {
       /* component is active in different context ... */
-      [self debugWithFormat:
-              @"WARNING: sleep context mismatch (own=0x%08X vs given=0x%08X)",
+      [self warnWithFormat:
+              @"sleep context mismatch (own=0x%08X vs given=0x%08X)",
               self->context, _ctx];
       return;
     }
@@ -386,13 +391,13 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
 - (WOSession *)session {
   if (self->session == nil) {
     if ((self->session = [[self context] session]) == nil) {
-      [self logWithFormat:@"could not get session object from context %@",
+      [self debugWithFormat:@"could not get session object from context %@",
               self->context];
     }
   }
   
   if (self->session == nil)
-    [self logWithFormat:@"WARNING: missing session for component!"];
+    [self warnWithFormat:@"missing session for component!"];
   
   return self->session;
 }
@@ -404,12 +409,12 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
   if (self->context)
     return self->context;
   
-  [self debugWithFormat:
-          @"WARNING: missing context in component 0x%08X (component%s)",
+  [self warnWithFormat:
+          @"missing context in component 0x%08X (component%s)",
           self,
           self->componentFlags.isAwake ? " is awake" : " is not awake"];
   if (abortOnMissingCtx) {
-    [self logWithFormat:@"aborting, because ctx is missing !"];
+    [self errorWithFormat:@"aborting, because ctx is missing !"];
     abort();
   }
     
@@ -418,7 +423,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
   [self _setContext:[self->application context]];
   
   if (self->context == nil)
-    [self logWithFormat:@"WARNING: could not determine context object!"];
+    [self warnWithFormat:@"could not determine context object!"];
   
   return self->context;
 }
@@ -485,7 +490,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
 
 - (void)setName:(NSString *)_name {
   if (![_name isNotNull])
-    [self logWithFormat:@"WARNING: setting 'nil' name on component!"];
+    [self warnWithFormat:@"setting 'nil' name on component!"];
   
   ASSIGNCOPY(self->wocName, _name);
 }
@@ -595,15 +600,15 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
   if (_ext) _name = [_name stringByAppendingPathExtension:_ext];
 
   if (cpath == nil) {
-    NSLog(@"WARNING: no path set in component %@", [self name]);
+    [self warnWithFormat:@"no path set in component %@", [self name]];
     return nil;
   }
   if (![fm fileExistsAtPath:cpath isDirectory:&isDirectory]) {
-    NSLog(@"WARNING: component directory %@ does not exist !", cpath);
+    [self warnWithFormat:@"component directory %@ does not exist !", cpath];
     return nil;
   }
   if (!isDirectory) {
-    NSLog(@"WARNING: component path %@ is not a directory !", cpath);
+    [self warnWithFormat:@"component path %@ is not a directory !", cpath];
     return nil;
   }
 
@@ -650,8 +655,8 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
   WOElement         *tmpl;
   
   if ((resourceManager = [self resourceManager]) == nil) {
-    [self logWithFormat:@"ERROR(%s): could not determine resource manager !",
-          __PRETTY_FUNCTION__];
+    [self errorWithFormat:@"%s: could not determine resource manager !",
+            __PRETTY_FUNCTION__];
     return nil;
   }
   
@@ -660,7 +665,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
     : [[[self context] request] browserLanguages];
   
   tmpl = [resourceManager templateWithName:_name languages:languages];
-  if (debugTemplates) [self logWithFormat:@"found template: %@", tmpl];
+  if (debugTemplates) [self debugWithFormat:@"found template: %@", tmpl];
   return tmpl;
 }
 
@@ -692,7 +697,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
     
     child = [child resolveWithParent:self];
     if (child == nil) {
-      [self logWithFormat:@"Could not resolve component fault: %@", _name];
+      [self warnWithFormat:@"Could not resolve component fault: %@", _name];
       return nil;
     }
     
@@ -720,9 +725,9 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
   
   if (parent == nil) {
     parent = [self parent];
-    NSLog(@"WARNING: tried to set value of binding '%@' in component '%@' "
-          @"without parent component (parent is '%@') !",
-          _name, [self name], [parent name]);
+    [self warnWithFormat:@"tried to set value of binding '%@' in component "
+            @"'%@' without parent component (parent is '%@') !",
+            _name, [self name], [parent name]];
   }
   
   [[self    retain] autorelease];
@@ -744,9 +749,9 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
   
   if (parent == nil) {
     parent = [self parent];
-    NSLog(@"WARNING: tried to retrieve value of binding '%@' in"
-          @" component '%@' without parent component (parent is '%@') !",
-          _name, [self name], [parent name]);
+    [self warnWithFormat:@"tried to retrieve value of binding '%@' in"
+            @" component '%@' without parent component (parent is '%@') !",
+            _name, [self name], [parent name]];
   }
   
   [[self    retain] autorelease];
@@ -798,8 +803,8 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
   NSAssert(parent != self, @"parent component equals current component");
 
   if (![parent respondsToSelector:action]) {
-    [self logWithFormat:@"parent %@ doesn't respond to %@",
-          [parent name], _name];
+    [self debugWithFormat:@"parent %@ doesn't respond to %@",
+            [parent name], _name];
     return nil;
   }
 
@@ -866,7 +871,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
             @"component %@ is not awake !", self);
   if (debugOn) {
     if (self->context != _ctx) {
-      [self debugWithFormat:@"WARNING(%s): component ctx != ctx (%@ vs %@)",
+      [self debugWithFormat:@"%s: component ctx != ctx (%@ vs %@)",
               __PRETTY_FUNCTION__, self->context, _ctx];
     }
   }
@@ -881,7 +886,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
     return;
   }
   
-  if (profElements)
+  if (perfLogger)
     st = [[NSDateClass date] timeIntervalSince1970];
     
   if (template->appendResponse) {
@@ -892,7 +897,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
   else
     [template appendToResponse:_response inContext:_ctx];
 
-  if (profElements) {
+  if (perfLogger) {
     NSTimeInterval diff;
     int i;
     diff = [[NSDateClass date] timeIntervalSince1970] - st;
@@ -900,10 +905,10 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
     for (i = [_ctx componentStackCount]; i >= 0; i--)
       printf("  ");
 #endif
-    printf("Template %s (comp %s): %0.3fs\n",
-           [[_ctx elementID] cString],
-           [[self name] cString],
-           diff);
+    [perfLogger logWithFormat:@"Template %@ (comp %@): %0.3fs\n",
+                  [_ctx elementID],
+                  [self name],
+                  diff];
   }
 }
   
@@ -919,7 +924,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
   response = [WOResponse responseWithRequest:[ctx request]];
   
   if (ctxID == nil) {
-    [self logWithFormat:@"missing ctx-id for context %@", ctx];
+    [self debugWithFormat:@"missing ctx-id for context %@", ctx];
     ctxID = @"noctx";
   }
   
@@ -1023,7 +1028,8 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
     if ([self logComponentVariableCreations]) {
       /* only if we have a subclass, we can store values in ivars ... */
       if (![[self->wocVariables objectForKey:_key] isNotNull]) {
-        [self logWithFormat:@"Created component variable (class=%@): '%@'.", 
+        [self debugWithFormat:
+                @"Created component variable (class=%@): '%@'.",
                 NSStringFromClass(self->isa), _key];
       }
     }
@@ -1033,10 +1039,10 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
     return;
   }
 
-  [self logWithFormat:
+  [self debugWithFormat:
           @"value %@ could not set via method or KVC "
           @"(self responds to %@: %s).",
-	  _key, _key,
+	        _key, _key,
           [self respondsToSelector:NSSelectorFromString(_key)] ? "yes" : "no"];
 #if 0
   return NO;
@@ -1049,7 +1055,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
     return value;
 
 #if DEBUG && 0
-  [self logWithFormat:@"KVC: accessed the component variable %@", _key];
+  [self debugWithFormat:@"KVC: accessed the component variable %@", _key];
 #endif
   if ((value = [self objectForKey:_key]))
     return value;
@@ -1078,8 +1084,8 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
   if ([self logComponentVariableCreations]) {
     /* only if we have a subclass, we can store values in ivars ... */
     if (![[self->wocVariables objectForKey:_key] isNotNull]) {
-      [self logWithFormat:@"Created component variable (class=%@): '%@'.", 
-	      NSStringFromClass(self->isa), _key];
+      [self debugWithFormat:@"Created component variable (class=%@): '%@'.", 
+	            NSStringFromClass(self->isa), _key];
     }
   }
 #endif
@@ -1089,7 +1095,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
 - (id)valueForUndefinedKey:(NSString *)_key {
   // Note: this is not used on libFoundation, insufficient KVC implementation
 #if DEBUG && 0
-  [self logWithFormat:@"KVC: accessed the component variable %@", _key];
+  [self debugWithFormat:@"KVC: accessed the component variable %@", _key];
 #endif
   return [self objectForKey:_key];
 }
@@ -1105,7 +1111,7 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
 
 - (void)unableToSetNilForKey:(NSString *)_key {
   // TODO: should we call setValue:NSNull forKey?
-  [self logWithFormat:@"ERROR: unable to set 'nil' for key: '%@'", _key];
+  [self errorWithFormat:@"unable to set 'nil' for key: '%@'", _key];
 }
 
 #endif /* KVC */
@@ -1113,8 +1119,8 @@ static inline id _getExtraVar(WOComponent *self, NSString *_key) {
 - (void)validationFailedWithException:(NSException *)_exception
   value:(id)_value keyPath:(NSString *)_keyPath
 {
-  [self logWithFormat:
-          @"WARNING: formatter failed for value %@ (keyPath=%@): %@",
+  [self warnWithFormat:
+          @"formatter failed for value %@ (keyPath=%@): %@",
           _value, _keyPath, [_exception reason]];
 }
 
diff --git a/sope-appserver/NGObjWeb/WOComponentDefinition.m b/sope-appserver/NGObjWeb/WOComponentDefinition.m
index 7da4e69a..44d3ff1d 100644
--- a/sope-appserver/NGObjWeb/WOComponentDefinition.m
+++ b/sope-appserver/NGObjWeb/WOComponentDefinition.m
@@ -129,9 +129,8 @@ static NSNumber *noNum      = nil;
       [child release];
     }
     else {
-      [self logWithFormat:
-              @"ERROR(%s): "
-	      @"Could not instantiate child fault %@, component: '%@'",
+      [self errorWithFormat:
+              @"(%s): Could not instantiate child fault %@, component: '%@'",
               __PRETTY_FUNCTION__, key, [childInfo componentName]];
     }
   }
@@ -261,7 +260,7 @@ static NSArray *woxExtensions = nil;
 }
 
 - (id)init {
-  [self debugWithFormat:@"ERROR: called -init on WOComponentDefinition!"];
+  [self errorWithFormat:@"called -init on WOComponentDefinition!"];
   [self release];
   return nil;
 }
@@ -346,10 +345,10 @@ static NSArray *woxExtensions = nil;
     static Class WOElementClass = Nil;
     if (WOElementClass == Nil) WOElementClass = [WOElement class];
     if (![cClass isKindOfClass:WOElementClass] && cClass != nil) {
-      [self logWithFormat:@"WARNING(%s:%i): "
-            @"component class %@ is not a subclass of WOElement !",
-            __PRETTY_FUNCTION__, __LINE__,
-            NSStringFromClass(cClass)];
+      [self warnWithFormat:@"(%s:%i): "
+              @"component class %@ is not a subclass of WOElement !",
+              __PRETTY_FUNCTION__, __LINE__,
+              NSStringFromClass(cClass)];
       return NO;
     }
   }
@@ -358,10 +357,10 @@ static NSArray *woxExtensions = nil;
 }
 - (BOOL)_checkComponentValidity:(id)component class:(Class)cClass {
   if (![component isKindOfClass:cClass] && component != nil) {
-    NSLog(@"WARNING2(%s:%i): component %@ is not a subclass of "
-          @"component class %@ !",
-          __PRETTY_FUNCTION__, __LINE__,
-          component, NSStringFromClass(cClass));
+    [self warnWithFormat:@"(%s:%i): component %@ is not a subclass of "
+            @"component class %@ !",
+            __PRETTY_FUNCTION__, __LINE__,
+            component, NSStringFromClass(cClass)];
     return NO;
   }
   return YES;
@@ -407,7 +406,7 @@ static NSArray *woxExtensions = nil;
     return;
   
   if ((woo = [NSDictionary dictionaryWithContentsOfFile:wooPath]) == nil) {
-    [self logWithFormat:@"ERROR: could not load .woo-file: '%@'", wooPath];
+    [self errorWithFormat:@"could not load .woo-file: '%@'", wooPath];
     return;
   }
   
@@ -486,11 +485,11 @@ static NSArray *woxExtensions = nil;
 
   if (debugOn) {
     if (![component isKindOfClass:cClass]) {
-      [self debugWithFormat:
-              @"WARNING(%s:%i): component '%@' is not a subclass of "
-          @"component class '%@' !",
-          __PRETTY_FUNCTION__, __LINE__,
-          component, NSStringFromClass(cClass)];
+      [self warnWithFormat:
+              @"(%s:%i): component '%@' is not a subclass of "
+              @"component class '%@' !",
+              __PRETTY_FUNCTION__, __LINE__,
+              component, NSStringFromClass(cClass)];
     }
   }
   return component;
diff --git a/sope-appserver/NGObjWeb/WOComponentRequestHandler.m b/sope-appserver/NGObjWeb/WOComponentRequestHandler.m
index 0209ec39..da440f13 100644
--- a/sope-appserver/NGObjWeb/WOComponentRequestHandler.m
+++ b/sope-appserver/NGObjWeb/WOComponentRequestHandler.m
@@ -151,10 +151,9 @@
 #endif
     }
     else if (response == nil) {
-      [[WOApplication application]
-                      logWithFormat:
-                        @"WARNING: got no session restoration error, "
-                        @"but missing session !"];
+      [[WOApplication application] warnWithFormat:
+                                     @"got no session restoration error, "
+                                     @"but missing session !"];
     }
   }
   else {
@@ -213,8 +212,8 @@
 #endif
   }
   else {
-    NSLog(@"WARNING(%s): did not enter request/response transaction ...",
-          __PRETTY_FUNCTION__);
+    [self warnWithFormat:@"%s: did not enter request/response transaction ...",
+            __PRETTY_FUNCTION__];
   }
 
   /* tear down */
diff --git a/sope-appserver/NGObjWeb/WOContext.m b/sope-appserver/NGObjWeb/WOContext.m
index 19e1f15c..cc757e1f 100644
--- a/sope-appserver/NGObjWeb/WOContext.m
+++ b/sope-appserver/NGObjWeb/WOContext.m
@@ -486,8 +486,7 @@ void WOContext_leaveComponent(WOContext *self, WOComponent *_component) {
   }
   
   if ([serverURL length] == 0) {
-    [self logWithFormat:
-	    @"ERROR: could not find x-webobjects-server-url header !"];
+    [self errorWithFormat:@"could not find x-webobjects-server-url header !"];
     return nil;
   }
   
@@ -823,7 +822,7 @@ void WOContext_leaveComponent(WOContext *self, WOComponent *_component) {
     
     if ([_path hasPrefix:@"/"]) {
 #if DEBUG
-      [self logWithFormat:@"WARNING: got absolute path '%@'", _path];
+      [self warnWithFormat:@"got absolute path '%@'", _path];
 #endif
       _path = [_path substringFromIndex:1];
     }
@@ -986,8 +985,8 @@ void WOContext_leaveComponent(WOContext *self, WOComponent *_component) {
 
 #if DEBUG
   if ([url length] == 0) {
-    NSLog(@"WARNING(%s): could not determine session URL prefix !",
-          __PRETTY_FUNCTION__);
+    [self warnWithFormat:@"(%s): could not determine session URL prefix !",
+            __PRETTY_FUNCTION__];
   }
 #endif
   
@@ -1043,7 +1042,7 @@ void WOContext_leaveComponent(WOContext *self, WOComponent *_component) {
   }
 #if DEBUG
   else {
-    [self debugWithFormat:@"WARNING: -popCursor called without cycle ctx !"];
+    [self warnWithFormat:@"-popCursor called without cycle ctx !"];
   }
 #endif
   
diff --git a/sope-appserver/NGObjWeb/WOCoreApplication+Bundle.m b/sope-appserver/NGObjWeb/WOCoreApplication+Bundle.m
index 18b9efd6..a03a4b09 100644
--- a/sope-appserver/NGObjWeb/WOCoreApplication+Bundle.m
+++ b/sope-appserver/NGObjWeb/WOCoreApplication+Bundle.m
@@ -93,20 +93,20 @@
   }
   
   if ([bp length] == 0) {
-    [self logDebugWithFormat:@"%s: did not find the bundle '%@' "
-                             @"in search list %@",
-                             __PRETTY_FUNCTION__, _bundleName, chkPathes];
+    [self debugWithFormat:
+            @"%s: did not find the bundle '%@' in search list %@",
+            __PRETTY_FUNCTION__, _bundleName, chkPathes];
     return 1;
   }
   
   if ((bundle = [NGBundle bundleWithPath:bp]) == nil) {
-    [self logDebugWithFormat:@"%s: did not find %@ at %@ ...",
-                             __PRETTY_FUNCTION__, _bundleName, bp];
+    [self debugWithFormat:@"%s: did not find %@ at %@ ...",
+            __PRETTY_FUNCTION__, _bundleName, bp];
     //return 1;
   }
   
   if (![bundle load]) {
-    [self logErrorWithFormat:@"%s: could not load %@ %@ (path=%@)...",
+    [self errorWithFormat:@"%s: could not load %@ %@ (path=%@)...",
                              __PRETTY_FUNCTION__, _bundleName, bundle, bp];
     //return 2;
   }
@@ -115,7 +115,7 @@
     //return 3;
   }
   
-  [self logDebugWithFormat:@"hosting bundle: %@", [bundle bundleName]];
+  [self debugWithFormat:@"hosting bundle: %@", [bundle bundleName]];
   
   return 0;
 }
diff --git a/sope-appserver/NGObjWeb/WOCoreApplication.m b/sope-appserver/NGObjWeb/WOCoreApplication.m
index 51172472..6e9a419f 100644
--- a/sope-appserver/NGObjWeb/WOCoreApplication.m
+++ b/sope-appserver/NGObjWeb/WOCoreApplication.m
@@ -65,6 +65,7 @@ NGObjWeb_DECLARE NSString *WOApplicationDidTerminateNotification =
 
 static BOOL     outputValidateOn = NO;
 static Class    NSDateClass      = Nil;
+static NGLogger *logger          = nil;
 static NGLogger *perfLogger      = nil;
 
 + (int)version {
@@ -76,8 +77,8 @@ static NSMutableArray *activeApps = nil; // THREAD
 
 + (id)application {
   if (WOApp == nil) {
-    [self logWarnWithFormat:@"(%s): some code called +application without an "
-                            @"active app !", __PRETTY_FUNCTION__];
+    [self warnWithFormat:@"%s: some code called +application without an "
+            @"active app !", __PRETTY_FUNCTION__];
 #if DEBUG && 0
 #  warning REMOVE THAT ABORT IN PRODUCTION CODE !!!
     abort();
@@ -97,7 +98,7 @@ static NSMutableArray *activeApps = nil; // THREAD
   unsigned idx;
   
   if (WOApp != self) {
-    [self logWithFormat:
+    [self warnWithFormat:
             @"tried to deactivate inactive application !\n"
             @"  self:   %@\n"
             @"  active: %@",
@@ -127,6 +128,7 @@ static NSMutableArray *activeApps = nil; // THREAD
   [self _initDefaults];
 
   lm         = [NGLoggerManager defaultLoggerManager];
+  logger     = [lm loggerForClass:self];
   perfLogger = [lm loggerForDefaultKey:@"WOProfileApplication"];
 
   ud               = [NSUserDefaults standardUserDefaults];
@@ -192,15 +194,11 @@ static NSMutableArray *activeApps = nil; // THREAD
 /* NGLogging */
 
 + (id)logger {
-  static id sharedLogger = nil;
-  if(sharedLogger == nil) {
-    sharedLogger = [[NGLogger alloc] initWithLogLevel:NGLogLevelDebug];
-  }
-  return sharedLogger;
+  return logger;
 }
 
 - (id)logger {
-  return [[self class] logger];
+  return logger;
 }
 
 /* signals */
@@ -257,7 +255,7 @@ static NSMutableArray *activeApps = nil; // THREAD
 
   adaptorClass = NSClassFromString(_name);
   if (adaptorClass == Nil) {
-    [self logWithFormat:@"ERROR: did not find adaptor class %@", _name];
+    [self errorWithFormat:@"did not find adaptor class %@", _name];
     return nil;
   }
 
@@ -304,21 +302,23 @@ static NSMutableArray *activeApps = nil; // THREAD
   WOResponse *r  = nil;
   
   if ([self respondsToSelector:@selector(handleException:)]) {
-    [self logWarnWithFormat:@"calling deprecated -handleException method !"];
+    [self warnWithFormat:@"calling deprecated -handleException method !"];
     return [self handleException:_exc];
   }
   
 #if 0 && DEBUG
-  [self logWithFormat:@"%@: caught (without context):\n  %@.", self, _exc];
+  [self errorWithFormat:@"%@: caught (without context):\n  %@.", self, _exc];
   abort();
 #endif
   
   if (_ctx == nil) {
-    [self logWithFormat:@"%@: caught (without context):\n  %@.", self, _exc];
+    [self errorWithFormat:@"%@: caught (without context):\n  %@.",
+      self, _exc];
     [self terminate];
   }
   else if (rq == nil) {
-    [self logWithFormat:@"%@: caught (without request):\n  %@.", self, _exc];
+    [self errorWithFormat:@"%@: caught (without request):\n  %@.",
+      self, _exc];
     [self terminate];
   }
   else {
@@ -328,7 +328,7 @@ static NSMutableArray *activeApps = nil; // THREAD
   }
   
   if ((r = [WOResponse responseWithRequest:rq]) == nil)
-    [self logWithFormat:@"could not create response !"];
+    [self warnWithFormat:@"could not create response !"];
     
   [r setStatus:500];
   return r;
@@ -440,7 +440,7 @@ static NSMutableArray *activeApps = nil; // THREAD
         adaptor = [self adaptorWithName:[moreAdaptors objectAtIndex:i]
                         arguments:nil];
         if (adaptor == nil) {
-          [self logWithFormat:@"could not find WOAdaptor '%@' !",
+          [self warnWithFormat:@"could not find WOAdaptor '%@' !",
                 [moreAdaptors objectAtIndex:i]];
           continue;
         }
@@ -584,8 +584,8 @@ static NSMutableArray *activeApps = nil; // THREAD
   static BOOL didWarn = NO;
 
   if (!didWarn) {
-    [self logWithFormat:
-            @"WARNING: output validation is enabled, this will "
+    [self warnWithFormat:
+            @"output validation is enabled, this will "
             @"slow down request processing!"];
     didWarn = YES;
   }
@@ -621,7 +621,7 @@ static NSMutableArray *activeApps = nil; // THREAD
       if ([self hideValidationIssue:issue])
         continue;
       [self logWithFormat:@"validate-output[%@]: %@",
-	      [(NSException *)issue name], [issue reason]];
+              [(NSException *)issue name], [issue reason]];
       continue;
     }
     
@@ -657,7 +657,7 @@ static NSMutableArray *activeApps = nil; // THREAD
     if (perfLogger) {
       NSTimeInterval rt;
       rt = [[NSDateClass date] timeIntervalSince1970] - startDispatch;
-      [perfLogger logInfoWithFormat:@"[woapp-rq]: request handler took %4.3fs.",
+      [perfLogger logWithFormat:@"[woapp-rq]: request handler took %4.3fs.",
                                     rt < 0.0 ? -1.0 : rt];
     }
   }
@@ -670,8 +670,8 @@ static NSMutableArray *activeApps = nil; // THREAD
   if (perfLogger) {
     NSTimeInterval rt;
     rt = [[NSDateClass date] timeIntervalSince1970] - startDispatch;
-    [perfLogger logInfoWithFormat:@"[woapp]: dispatchRequest took %4.3fs.",
-                                  rt < 0.0 ? -1.0 : rt];
+    [perfLogger logWithFormat:@"[woapp]: dispatchRequest took %4.3fs.",
+                  rt < 0.0 ? -1.0 : rt];
   }
   
   return response;
@@ -680,14 +680,14 @@ static NSMutableArray *activeApps = nil; // THREAD
   WORequestHandler *handler;
   
   if ([self respondsToSelector:@selector(handleRequest:)]) {
-    [self logWarnWithFormat:
+    [self warnWithFormat:
             @"calling deprecated -handleRequest: method .."];
     return [self handleRequest:_request];
   }
   
   /* find request handler for request */
   if ((handler = [self handlerForRequest:_request]) == nil) {
-    [self logErrorWithFormat:@"got no request handler for request: %@ !",
+    [self errorWithFormat:@"got no request handler for request: %@ !",
 	    _request];
     return nil;
   }
@@ -749,22 +749,22 @@ static NSMutableArray *activeApps = nil; // THREAD
   
   apath = [self findNGObjWebResource:@"Defaults" ofType:@"plist"];
   if (apath == nil)
-    [self logErrorWithFormat:@"cannot find Defaults.plist resource of NGObjWeb library!"];
+    [self errorWithFormat:@"cannot find Defaults.plist resource of NGObjWeb library!"];
 #if HEAVY_DEBUG
   else
-    [self logDebugWithFormat:@"Note: loading default defaults: %@", apath];
+    [self debugWithFormat:@"Note: loading default defaults: %@", apath];
 #endif
   
   owDefaults = [NSDictionary dictionaryWithContentsOfFile:apath];
   if (owDefaults) {
     [[NSUserDefaults standardUserDefaults] registerDefaults:owDefaults];
 #if HEAVY_DEBUG
-    [self logDebugWithFormat:@"did register NGObjWeb defaults: %@\n%@", 
-	    apath, owDefaults];
+    [self debugWithFormat:@"did register NGObjWeb defaults: %@\n%@", 
+            apath, owDefaults];
 #endif
   }
   else {
-    [self logErrorWithFormat:@"could not load NGObjWeb defaults: '%@'",
+    [self errorWithFormat:@"could not load NGObjWeb defaults: '%@'",
 	    apath];
   }
 }
@@ -810,7 +810,7 @@ static NSMutableArray *activeApps = nil; // THREAD
   if ([addr isKindOfClass:[NGInternetSocketAddress class]])
     return [NSNumber numberWithInt:[(NGInternetSocketAddress *)addr port]];
 
-  [self logFatalWithFormat:@"GOT NO PORT FOR ADDR: %@ (%@)", addr, woport];
+  [self fatalWithFormat:@"GOT NO PORT FOR ADDR: %@ (%@)", addr, woport];
   return nil;
 }
 
diff --git a/sope-appserver/NGObjWeb/WODirectAction.m b/sope-appserver/NGObjWeb/WODirectAction.m
index ced47602..41245f28 100644
--- a/sope-appserver/NGObjWeb/WODirectAction.m
+++ b/sope-appserver/NGObjWeb/WODirectAction.m
@@ -212,12 +212,12 @@
 #if !LIB_FOUNDATION_LIBRARY
 
 - (void)setValue:(id)_value forUndefinedKey:(NSString *)_key {
-  [self logWithFormat:
-	  @"WARNING: tried to set value for undefined KVC key: '%@'", _key];
+  [self warnWithFormat:
+          @"tried to set value for undefined KVC key: '%@'", _key];
 }
 - (id)valueForUndefinedKey:(NSString *)_key {
-  [self logWithFormat:
-	  @"WARNING: tried to access undefined KVC key: '%@'", _key];
+  [self warnWithFormat:
+             @"tried to access undefined KVC key: '%@'", _key];
   return nil;
 }
 
diff --git a/sope-appserver/NGObjWeb/WODirectActionRequestHandler.m b/sope-appserver/NGObjWeb/WODirectActionRequestHandler.m
index 30ccbd86..a73aa380 100644
--- a/sope-appserver/NGObjWeb/WODirectActionRequestHandler.m
+++ b/sope-appserver/NGObjWeb/WODirectActionRequestHandler.m
@@ -175,7 +175,7 @@ static Class NSDateClass = Nil;
     actionName = @"default";
 
   if ((*(&actionClass) = NSClassFromString(actionClassName)) == Nil) {
-    [self logWithFormat:@"ERROR: did not find direct action class %@",
+    [self errorWithFormat:@"did not find direct action class %@",
             actionClassName];
     actionClass = [WODirectAction class];
   }
@@ -193,8 +193,8 @@ static Class NSDateClass = Nil;
 		       application:app];
   
   if (actionObject == nil) {
-    [self logWithFormat:
-            @"ERROR: could not create direct action object of class %@",
+    [self errorWithFormat:
+            @"could not create direct action object of class %@",
             actionClassName];
     actionObject = nil;
   }
diff --git a/sope-appserver/NGObjWeb/WODisplayGroup.m b/sope-appserver/NGObjWeb/WODisplayGroup.m
index b2e3c263..e16519f4 100644
--- a/sope-appserver/NGObjWeb/WODisplayGroup.m
+++ b/sope-appserver/NGObjWeb/WODisplayGroup.m
@@ -18,7 +18,7 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
+// $Id: WODisplayGroup.m 1 2004-08-20 10:08:27Z znek $
 
 #include 
 #import 
@@ -268,7 +268,7 @@ static NSArray  *uint0Array = nil;
   return nil;
 }
 - (id)displayBatchContainingSelectedObject {
-  NSLog(@"WARNING: %s not implemenented", __PRETTY_FUNCTION__);
+  [self warnWithFormat:@"%s not implemenented", __PRETTY_FUNCTION__];
   [self updateDisplayedObjects];
   return nil;
 }
@@ -363,7 +363,7 @@ static NSArray  *uint0Array = nil;
 }
 
 - (void)setSelectedObject:(id)_obj {
-  NSLog(@"WARNING: %s not implemented.", __PRETTY_FUNCTION__);
+  [self warnWithFormat:@"%s not implemented.", __PRETTY_FUNCTION__];
 }
 - (id)selectedObject {
   return nil;
@@ -371,7 +371,7 @@ static NSArray  *uint0Array = nil;
 
 - (void)setSelectedObjects:(NSArray *)_objs {
   [self selectObjectsIdenticalTo:_objs];
-  //  NSLog(@"WARNING: %s not implemented.", __PRETTY_FUNCTION__);
+  //  [self warnWithFormat:@"%s not implemented.", __PRETTY_FUNCTION__];
 }
 - (NSArray *)selectedObjects {
   NSMutableArray *result;
diff --git a/sope-appserver/NGObjWeb/WODynamicElement.m b/sope-appserver/NGObjWeb/WODynamicElement.m
index e7cb6f74..fad4be9a 100644
--- a/sope-appserver/NGObjWeb/WODynamicElement.m
+++ b/sope-appserver/NGObjWeb/WODynamicElement.m
@@ -151,8 +151,9 @@ static Class FormElementClass = Nil;
     return;
   
   if (self->extraAttributes) {
-    NSLog(@"ERROR(%s): tried to reset extra attributes (access denied) !!!",
-          __PRETTY_FUNCTION__);
+    [self errorWithFormat:
+            @"(%s): tried to reset extra attributes (access denied) !!!",
+            __PRETTY_FUNCTION__];
     return;
   }
   
diff --git a/sope-appserver/NGObjWeb/WOElementID.m b/sope-appserver/NGObjWeb/WOElementID.m
index 2c06e2c2..fd82c468 100644
--- a/sope-appserver/NGObjWeb/WOElementID.m
+++ b/sope-appserver/NGObjWeb/WOElementID.m
@@ -18,7 +18,7 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
+// $Id: WOElementID.m 1 2004-08-20 10:08:27Z znek $
 
 #include "WOElementID.h"
 #include "common.h"
@@ -39,7 +39,7 @@
     return nil;
   }
   if (self->elementIdCount > NGObjWeb_MAX_ELEMENT_ID_COUNT) {
-    [self logWithFormat:@"ERROR: request element ID is too long (%i parts)",
+    [self errorWithFormat:@"request element ID is too long (%i parts)",
             self->elementIdCount];
     [self release];
     return nil;
@@ -218,14 +218,12 @@ static int callCount       = 0;
   id v;
   
   if (self->elementIdCount < 1) {
-    [self logWithFormat:
-	    @"WARNING: tried to increment a non-existing element-id"];
+    [self warnWithFormat:@"tried to increment a non-existing element-id"];
     return;
   }
   else if (self->elementIdCount >= NGObjWeb_MAX_ELEMENT_ID_COUNT) {
-    [self logWithFormat:
-	    @"ERROR: exceeded element-id restriction (max=%i)", 
-	    NGObjWeb_MAX_ELEMENT_ID_COUNT];
+    [self errorWithFormat:@"exceeded element-id restriction (max=%i)", 
+	          NGObjWeb_MAX_ELEMENT_ID_COUNT];
     return;
   }
   
diff --git a/sope-appserver/NGObjWeb/WOFileSessionStore.m b/sope-appserver/NGObjWeb/WOFileSessionStore.m
index e2710951..2fd7fd1c 100644
--- a/sope-appserver/NGObjWeb/WOFileSessionStore.m
+++ b/sope-appserver/NGObjWeb/WOFileSessionStore.m
@@ -18,7 +18,7 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
+// $Id: WOFileSessionStore.m 1 2004-08-20 10:08:27Z znek $
 
 #include 
 
@@ -168,8 +168,8 @@ static BOOL logExpire = YES;
     return nil;
   
   if (![_sid isKindOfClass:[NSString class]]) {
-    NSLog(@"WARNING(%s): got invalid session id (expected string !): %@",
-          __PRETTY_FUNCTION__, _sid);
+    [self warnWithFormat:@"%s: got invalid session id (expected string !): %@",
+            __PRETTY_FUNCTION__, _sid];
     return nil;
   }
   
diff --git a/sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m b/sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m
index c3d506b0..dd5effc9 100644
--- a/sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m
+++ b/sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m
@@ -66,6 +66,7 @@
 
 @implementation WOHttpAdaptor
 
+static NGLogger *logger                      = nil;
 static NGLogger *perfLogger                  = nil;
 static BOOL     WOHttpAdaptor_LogStream      = NO;
 static BOOL     WOContactSNS                 = NO;
@@ -87,19 +88,24 @@ static BOOL     debugOn                      = NO;
   return [super version] + 1 /* v2 */;
 }
 + (void)initialize {
-  NSUserDefaults  *ud = [NSUserDefaults standardUserDefaults];
-  NGLoggerManager *um = [NGLoggerManager defaultLoggerManager];
+  NSUserDefaults  *ud;
+  NGLoggerManager *lm;
   static BOOL     didInit = NO;
 
   if (didInit) return;
   didInit = YES;
-  
+
   NSAssert2([super version] == 1,
             @"invalid superclass (%@) version %i !",
             NSStringFromClass([self superclass]), [super version]);
+
+  ud = [NSUserDefaults standardUserDefaults];
+  lm = [NGLoggerManager defaultLoggerManager];
   
+  logger     = [lm loggerForClass:self];
+  perfLogger = [lm loggerForDefaultKey:@"WOProfileHttpAdaptor"];
+
   WOHttpAdaptor_LogStream = [ud boolForKey:@"WOHttpAdaptor_LogStream"];
-  perfLogger = [um loggerForDefaultKey:@"WOProfileHttpAdaptor"];
 
   // TODO: those two should be queried on demand to allow different defaults
   WOPort       = [[ud stringForKey:@"WOPort"] copy];
@@ -127,7 +133,7 @@ static BOOL     debugOn                      = NO;
   }
   
   if (WOCoreOnHTTPAdaptorException)
-    [self logWarnWithFormat:@"will dump core on HTTP adaptor exception!"];
+    [logger warnWithFormat:@"will dump core on HTTP adaptor exception!"];
 }
 
 - (id)autoBindAddress {
@@ -208,14 +214,14 @@ static BOOL     debugOn                      = NO;
     self->address = [self->address retain];
     
     if (self->address == nil) {
-      [_application logErrorWithFormat:
+      [_application errorWithFormat:
                       @"got no address for HTTP server (using arg '%@')", arg];
       [self release];
       return nil;
     }
     
     if (!WOContactSNS) {
-      [_application logInfoWithFormat:@"%@ listening on address %@",
+      [_application logWithFormat:@"%@ listening on address %@",
                       NSStringFromClass([self class]),
                       [(id)self->address stringValue]];
     }
@@ -249,7 +255,7 @@ static BOOL     debugOn                      = NO;
 /* events */
 
 - (void)handleSIGPIPE:(int)_signal {
-  [self logWarnWithFormat:@"caught SIGPIPE !"];
+  [self warnWithFormat:@"caught SIGPIPE !"];
 }
 
 - (void)registerForEvents {
@@ -276,7 +282,7 @@ static BOOL     debugOn                      = NO;
       
       self->address = [[self->socket localAddress] retain];
       
-      [self logInfoWithFormat:@"bound to kernel assigned address %@: %@",
+      [self logWithFormat:@"bound to kernel assigned address %@: %@",
               self->address, self->socket];
     }
   }
@@ -347,20 +353,10 @@ static BOOL     debugOn                      = NO;
   return self->maxThreadCount;
 }
 
-/* logging */
-
-- (id)logger {
-  static id sharedLogger = nil;
-  if(sharedLogger == nil) {
-    sharedLogger = [[NGLogger alloc] initWithLogLevel:NGLogLevelDebug];
-  }
-  return sharedLogger;
-}
-
 /* run-loop */
 
 - (void)_serverCatched:(NSException *)_exc {
-  [self logErrorWithFormat:@"http server caught: %@", _exc];
+  [self errorWithFormat:@"http server caught: %@", _exc];
   if (WOCoreOnHTTPAdaptorException) abort();
 }
 
@@ -368,7 +364,7 @@ static BOOL     debugOn                      = NO;
   WOHttpTransaction *tx;
   
   if (_socket == nil) {
-    [self logErrorWithFormat:@"got no socket for transaction ??"];
+    [self errorWithFormat:@"got no socket for transaction ??"];
     return NO;
   }
   
@@ -426,8 +422,8 @@ static BOOL     debugOn                      = NO;
 
   if (perfLogger) {
     t = [[NSDate date] timeIntervalSince1970] - t;
-    [perfLogger logInfoWithFormat:@"handling of request took %4.3fs.",
-                                  t < 0.0 ? -1.0 : t];
+    [perfLogger logWithFormat:@"handling of request took %4.3fs.",
+                  t < 0.0 ? -1.0 : t];
   }
 }
 
@@ -440,8 +436,7 @@ static BOOL     debugOn                      = NO;
   id remote;
 
   if ((remote = [_connection remoteAddress]) == nil) {
-    [self logErrorWithFormat:
-            @"missing remote address for connection: %@",
+    [self errorWithFormat:@"missing remote address for connection: %@",
             _connection];
     return nil;
   }
@@ -481,7 +476,7 @@ static BOOL     debugOn                      = NO;
         return _connection;
     }
     
-    [self logErrorWithFormat:@"ACCESS DENIED: %@", ipAddr];
+    [self errorWithFormat:@"ACCESS DENIED: %@", ipAddr];
     _connection = nil;
   }
   
@@ -501,7 +496,7 @@ static BOOL     debugOn                      = NO;
       if (connection == nil)
         [self _serverCatched:[self->socket lastException]];
       else
-	[self debugWithFormat:@"accepted connection: %@", connection];
+        [self debugWithFormat:@"accepted connection: %@", connection];
     }
     NS_HANDLER {
       connection = nil;
@@ -523,7 +518,7 @@ static BOOL     debugOn                      = NO;
         [NSThread detachNewThreadSelector:@selector(_handleAcceptedConnection:)
                   toTarget:self
                   withObject:[connection retain]];
-        [self logInfoWithFormat:@"detached new thread for request."];
+        [self logWithFormat:@"detached new thread for request."];
         //[NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:10]];
       }
       connection = nil;
@@ -542,8 +537,8 @@ static BOOL     debugOn                      = NO;
       [self->socket close];
       [self->socket release]; self->socket = nil;
     }
-    [self logInfoWithFormat:@"adaptor stops application: %@ ...",
-                            self->application];
+    [self logWithFormat:@"adaptor stops application: %@ ...",
+            self->application];
     exit(0);
   }
 }
diff --git a/sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m b/sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m
index f63c39b2..d4c35dba 100644
--- a/sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m
+++ b/sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m
@@ -46,7 +46,6 @@ NSString *WOAsyncResponseReadyNotificationName =
   @"WOAsyncResponseReadyNotification";
 NSString *WOAsyncResponse = @"WOAsyncResponse";
 
-static int HTTP_PERFLOG = -1;
 
 @interface WOCoreApplication(SimpleParserSelection)
 
@@ -58,21 +57,28 @@ static int HTTP_PERFLOG = -1;
 
 static NSMutableDictionary *pendingTransactions = nil; // THREAD
 static BOOL useSimpleParser = YES;
-static int  debugOn = -1;
 static int  doCore  = -1;
-static NSString *adLogPath = nil;
+static NSString *adLogPath   = nil;
+static NGLogger *debugLogger = nil;
+static NGLogger *perfLogger  = nil;
 
 + (int)version {
   return 2;
 }
 + (void)initialize {
+  NSUserDefaults  *ud;
+  NGLoggerManager *lm;
   static BOOL didInit = NO;
-  NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
+
   if (didInit) return;
   didInit = YES;
-  
+
+  lm          = [NGLoggerManager defaultLoggerManager];
+  perfLogger  = [lm loggerForDefaultKey:@"WOProfileHttpAdaptor"];
+  debugLogger = [lm loggerForDefaultKey:@"WODebugHttpTransaction"];
+
+  ud = [NSUserDefaults standardUserDefaults];
   useSimpleParser = [ud boolForKey:@"WOHttpTransactionUseSimpleParser"];
-  debugOn = [[ud objectForKey:@"WODebugHttpTransaction"] boolValue] ? 1 : 0;
   doCore = [[ud objectForKey:@"WOCoreOnHTTPAdaptorException"] boolValue]?1:0;
   
   adLogPath = [[ud stringForKey:@"WOAdaptorLogPath"] copy];
@@ -83,19 +89,16 @@ static NSString *adLogPath = nil;
   return [WOHttpAdaptor optionLogStream];
 }
 - (BOOL)optionLogPerf {
-  return HTTP_PERFLOG;
+  return perfLogger ? YES : NO;
 }
 
 - (BOOL)isDebuggingEnabled {
-  return debugOn ? YES : NO;
+  return debugLogger ? YES : NO;
 }
 
 - (id)initWithSocket:(id)_socket
   application:(WOCoreApplication *)_app
 {
-  if (HTTP_PERFLOG == -1)
-    HTTP_PERFLOG = [WOHttpAdaptor optionLogPerf] ? 1 : 0;
-  
   NSAssert(_socket, @"missing socket ...");
   NSAssert(_app,    @"missing application ...");
   self->socket      = [_socket retain];
@@ -118,8 +121,8 @@ static NSString *adLogPath = nil;
 
 - (void)reset {
   if (self->asyncResponseToken) {
-    [self logWithFormat:
-            @"WARNING: resetting while async response pending ... (%@)",
+    [self warnWithFormat:
+            @"resetting while async response pending ... (%@)",
             self->asyncResponseToken];
     abort();
     
@@ -146,16 +149,16 @@ static NSString *adLogPath = nil;
     return;
 
   [self logResponse:self->woResponse
-	toRequest:self->woRequest
-	connection:self->socket];
-    
-  if (HTTP_PERFLOG) {
+	      toRequest:self->woRequest
+        connection:self->socket];
+
+  if (perfLogger) {
       struct timeval tv;
       gettimeofday(&tv, NULL);
       self->t = (((double)tv.tv_sec) * ((double)tv.tv_usec) / 1000.0)  - 
-	self->t;
-      NSLog(@"processing of request took %4.3fs.", 
-	    self->t < 0.0 ? -self->t : self->t);
+        self->t;
+      [perfLogger logWithFormat:@"processing of request took %4.3fs.", 
+	                  self->t < 0.0 ? -self->t : self->t];
   }
 }
 
@@ -336,7 +339,7 @@ static int logCounter = 0;
   id request = nil;
 
   if (self->woRequest)
-    [self logWithFormat:@"WARNING: woRequest already set ???"];
+    [self warnWithFormat:@"woRequest already set ???"];
   
   if ([self->application shouldUseSimpleHTTPParserForTransaction:self]) {
     WOSimpleHTTPParser *parser;
@@ -346,7 +349,7 @@ static int logCounter = 0;
     
     if (self->woRequest == nil) {
       ASSIGN(self->lastException, [parser lastException]);
-      [self logWithFormat:@"failed to parse request: %@", self->lastException];
+      [self errorWithFormat:@"failed to parse request: %@", self->lastException];
     }
     [parser release];
   }
@@ -364,8 +367,9 @@ static int logCounter = 0;
   [log resetReadLog];
   
   if ([self->woRequest isCodeRedAttack]) {
-    NSLog(@"WOHttpAdaptor: detected 'Code Red' request: '%@', blocking.",
-          [self->woRequest uri]);
+    [self logWithFormat:
+            @"WOHttpAdaptor: detected 'Code Red' request: '%@', blocking.",
+            [self->woRequest uri]];
     ASSIGN(self->woRequest, (id)nil);
     return NO;
   }
@@ -375,24 +379,24 @@ static int logCounter = 0;
   /* apply some adaptor headers in direct-connect mode  */
   [self applyAdaptorHeadersWithHttpRequest:request];
   
-  if (HTTP_PERFLOG) {
+  if (perfLogger) {
     NSTimeInterval rt;
     self->requestFinishTime = [[NSDate date] timeIntervalSince1970];
     rt = self->requestFinishTime - self->t;
-    NSLog(@"[httpperf]: decoding of request took %4.3fs.",
-          rt < 0.0 ? -1.0 : rt);
+    [perfLogger logWithFormat:@"decoding of request took %4.3fs.",
+                  rt < 0.0 ? -1.0 : rt];
   }
   
   return self->woRequest ? YES : NO;
 }
 
 - (BOOL)_sendResponse {
-  if (HTTP_PERFLOG) {
+  if (perfLogger) {
     NSTimeInterval rt;
     self->dispatchFinishTime = [[NSDate date] timeIntervalSince1970];
     rt = self->dispatchFinishTime - self->requestFinishTime;
-    NSLog(@"[httpperf]: dispatch of request took %4.3fs.",
-          rt < 0.0 ? -1.0 : rt);
+    [perfLogger logWithFormat:@"dispatch of request took %4.3fs.",
+                  rt < 0.0 ? -1.0 : rt];
   }
   
   if (self->woResponse) {
@@ -400,16 +404,15 @@ static int logCounter = 0;
           toRequest:self->woRequest
           onStream:self->io];
     
-    if (HTTP_PERFLOG) {
+    if (perfLogger) {
       NSTimeInterval rt;
       rt = [[NSDate date] timeIntervalSince1970] - dispatchFinishTime;
-      NSLog(@"[httpperf]: delivery of request took %4.3fs.",
-            rt < 0.0 ? -1.0 : rt);
+      [perfLogger logWithFormat:@"delivery of request took %4.3fs.",
+                    rt < 0.0 ? -1.0 : rt];
     }
   }
   else if (self->woRequest) {
-    [self logWithFormat:
-            @"ERROR: got no response for request %@ ..",
+    [self errorWithFormat:@"got no response for request %@ ..",
             self->woRequest];
       
     self->woResponse = [[self generateMissingResponse] retain];
@@ -446,14 +449,14 @@ static int logCounter = 0;
   WOResponse *response;
   
   if ([self->asyncResponseToken length] == 0) {
-    [self logWithFormat:
+    [self errorWithFormat:
             @"got response ready notification (%@), "
             @"but no async HTTP transaction is in progress ...",
             _notification];
     return;
   }
   if (![self->asyncResponseToken isEqual:[_notification object]]) {
-    [self logWithFormat:
+    [self errorWithFormat:
             @"got response ready notification (%@) for a different "
             @"token (%@ vs %@) !",
             _notification, self->asyncResponseToken, [_notification object]];
@@ -504,7 +507,7 @@ static int logCounter = 0;
   
   token = [[_response userInfo] objectForKey:WOAsyncResponseTokenKey];
   if ([token length] == 0) {
-    [self logWithFormat:@"missing async response token in response %@",
+    [self errorWithFormat:@"missing async response token in response %@",
             _response];
     return NO;
   }
@@ -614,7 +617,7 @@ static int logCounter = 0;
     [parser release]; parser = nil;
   }
   NS_HANDLER {
-    [self logWithFormat:format, localException];
+    [self errorWithFormat:format, localException];
     [parser release]; parser = nil;
     [localException raise];
   }
@@ -660,9 +663,8 @@ static int logCounter = 0;
   /* check HTTP validity */
   if ([_response status] == NGHttpStatusCode_Unauthorized) {
     if ([_response headerForKey:@"www-authenticate"] == nil) {
-      [self logWithFormat:
-              @"WARNING: response is %i, "
-              @"but no www-authenticate header is set.",
+      [self warnWithFormat:
+              @"response is %i, but no www-authenticate header is set.",
               NGHttpStatusCode_Unauthorized];
     }
   }
@@ -824,10 +826,10 @@ static int logCounter = 0;
       
       e = [out lastException];
       if ([e isKindOfClass:[NGSocketShutdownException class]]) {
-        [self logWithFormat:disconnectError,
-              _request,
-              [[_response content] length],
-              [e reason]];
+        [self errorWithFormat:disconnectError,
+                _request,
+                [[_response content] length],
+                [e reason]];
       }
       else
         [e raise];
@@ -835,13 +837,13 @@ static int logCounter = 0;
   }
   NS_HANDLER {
     if ([localException isKindOfClass:[NGSocketShutdownException class]]) {
-      [self logWithFormat:disconnectError,
+      [self errorWithFormat:disconnectError,
               _request,
               [[_response content] length],
               [localException reason]];
     }
     else {
-      [self logWithFormat:deliveryError, localException];
+      [self errorWithFormat:deliveryError, localException];
       [out release]; out = nil; // the buffer will be flushed ..
 
       [localException raise];
diff --git a/sope-appserver/NGObjWeb/WOHttpAdaptor/WORequestParser.m b/sope-appserver/NGObjWeb/WOHttpAdaptor/WORequestParser.m
index 605231b2..e4958351 100644
--- a/sope-appserver/NGObjWeb/WOHttpAdaptor/WORequestParser.m
+++ b/sope-appserver/NGObjWeb/WOHttpAdaptor/WORequestParser.m
@@ -18,7 +18,7 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
+// $Id: WORequestParser.m 1 2004-08-20 10:08:27Z znek $
 
 #include "WORequestParser.h"
 #include 
@@ -27,6 +27,22 @@
 
 @implementation WORequestParser
 
+static NGLogger *logger = nil;
+
++ (void)initialize {
+  NGLoggerManager *lm;
+  static BOOL didInit = NO;
+  if (didInit)
+    return;
+  didInit = YES;
+  lm      = [NGLoggerManager defaultLoggerManager];
+  logger  = [lm loggerForDefaultKey:@"WORequestParserDebugEnabled"];
+  if (!logger) {
+    logger = [lm loggerForClass:self];
+    [logger setLogLevel:NGLogLevelInfo];
+  }
+}
+
 - (id)initWithBufferedStream:(NGBufferedStream *)_in {
   if (_in == nil) {
     [self release];
@@ -268,8 +284,8 @@ static inline BOOL skipSpaces(WORequestParser *self) {
     return nil;
 
   [self debugWithFormat:@"stage 1: method=%@ uri=%@ version=%@",
-	  method, uri, v];
-  
+          method, uri, v];
+
   /* headers */
   
   if ((headers = [self parseHeaders]) == nil)
@@ -315,6 +331,10 @@ static inline BOOL skipSpaces(WORequestParser *self) {
 
 /* logging */
 
+- (id)logger {
+  return logger;
+}
+
 - (NSString *)loggingPrefix {
   return @"[http-parser]";
 }
diff --git a/sope-appserver/NGObjWeb/WOMessage.m b/sope-appserver/NGObjWeb/WOMessage.m
index e3fb0019..db9f97f4 100644
--- a/sope-appserver/NGObjWeb/WOMessage.m
+++ b/sope-appserver/NGObjWeb/WOMessage.m
@@ -139,8 +139,8 @@ static __inline__ NSMutableData *_checkBody(WOMessage *self) {
   [old release];
   
   if (self->version != nil && ![_httpVersion hasPrefix:@"HTTP/"]) {
-    [self logWithFormat:
-            @"WARNING: you apparently passed in an invalid HTTP version: '%@'",
+    [self warnWithFormat:
+            @"you apparently passed in an invalid HTTP version: '%@'",
             _httpVersion];
   }
 }
@@ -398,8 +398,8 @@ static __inline__ NSMutableData *_checkBody(WOMessage *self) {
       NSString *s;
     
 #if DEBUG
-      [self logWithFormat:
-              @"WARNING: using NSString to add a character %i,0x%08X"
+      [self warnWithFormat:
+              @"using NSString to add a character %i,0x%08X"
               @"(slow, encoding=%i).", _c, _c, self->contentEncoding];
 #endif
       
@@ -508,8 +508,9 @@ static __inline__ NSMutableData *_checkBody(WOMessage *self) {
   }
 #endif
   if (cdata == NULL) {
-    NSLog(@"ERROR(%s): could not convert string non-lossy to encoding %i !",
-          __PRETTY_FUNCTION__, self->contentEncoding);
+    [self errorWithFormat:
+            @"(%s): could not convert string non-lossy to encoding %i !",
+            __PRETTY_FUNCTION__, self->contentEncoding];
     cdata = [_value dataUsingEncoding:self->contentEncoding
                     allowLossyConversion:YES];
   }
diff --git a/sope-appserver/NGObjWeb/WOPageRequestHandler.m b/sope-appserver/NGObjWeb/WOPageRequestHandler.m
index 8cdebd6b..8cb15e84 100644
--- a/sope-appserver/NGObjWeb/WOPageRequestHandler.m
+++ b/sope-appserver/NGObjWeb/WOPageRequestHandler.m
@@ -18,7 +18,7 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
+// $Id: WOPageRequestHandler.m 1 2004-08-20 10:08:27Z znek $
 
 #include 
 
@@ -131,8 +131,8 @@ static BOOL  debugOn             = NO;
     pageName = @"Main";
   
   if ((page = [app pageWithName:pageName inContext:context]) == nil) {
-    [self logWithFormat:
-            @"ERROR: could not create page object with name %@", pageName];
+    [self errorWithFormat:
+            @"could not create page object with name %@", pageName];
     return nil;
   }
   
diff --git a/sope-appserver/NGObjWeb/WORequest.m b/sope-appserver/NGObjWeb/WORequest.m
index 92a1843a..5f087442 100644
--- a/sope-appserver/NGObjWeb/WORequest.m
+++ b/sope-appserver/NGObjWeb/WORequest.m
@@ -88,8 +88,8 @@ static BOOL debugOn = NO;
     
   apath = [WOApplication findNGObjWebResource:@"Languages" ofType:@"plist"];
   if (apath == nil) {
-    NSLog(@"ERROR: cannot find Languages.plist resource "
-	  @"of NGObjWeb library !");
+    [self errorWithFormat:@"cannot find Languages.plist resource "
+            @"of NGObjWeb library !"];
     langMap = nil;
   }
   else
@@ -103,7 +103,8 @@ static BOOL debugOn = NO;
     [ud registerDefaults:defs];
   }
   else
-    NSLog(@"WARNING: did not register browser language mappings: %@", apath);
+    [self warnWithFormat:
+            @"did not register browser language mappings: %@", apath];
 }
 
 /* parse URI */
@@ -428,7 +429,7 @@ static BOOL debugOn = NO;
     if ((ctype = [self headerForKey:@"content-type"]) != nil) {
       isFormContent = [ctype hasPrefix:@"application/x-www-form-urlencoded"];
       if (!isFormContent)
-	isMultiPartContent = [ctype hasPrefix:@"multipart/form-data"];
+        isMultiPartContent = [ctype hasPrefix:@"multipart/form-data"];
     }
     
     if (query != nil || isFormContent || isMultiPartContent) {
@@ -439,16 +440,15 @@ static BOOL debugOn = NO;
       
       /* parse query string */
       if (query)
-	[self _parseQueryParameters:query intoMap:self->formContent];
+        [self _parseQueryParameters:query intoMap:self->formContent];
       
       /* parse content (if form content) */
       if (isFormContent) {
-	[self _parseQueryParameters:[self contentAsString]
+        [self _parseQueryParameters:[self contentAsString]
 	      intoMap:self->formContent];
       }
       else if (isMultiPartContent) {
-	[self logWithFormat:
-		@"ERROR: missing NGHttpRequest, cannot parse multipart"];
+        [self errorWithFormat:@"missing NGHttpRequest, cannot parse multipart"];
       }
       
       [pool release];
@@ -501,8 +501,8 @@ static BOOL debugOn = NO;
   if ([paras isKindOfClass:[NSDictionary class]])
     return paras;
   
-  [self logWithFormat:
-	  @"ERROR(%s): don't know how to deal with form object: %@", paras];
+  [self errorWithFormat:@"(%s): don't know how to deal with form object: %@",
+          paras];
   return nil;
 }
 
@@ -519,8 +519,7 @@ static BOOL debugOn = NO;
     
     langMap = [[ud dictionaryForKey:@"WOBrowserLanguageMappings"] copy];
     if (langMap == nil) {
-      [self debugWithFormat:
-              @"WARNING: did not find browser language mappings!"];
+      [self warnWithFormat:@"did not find browser language mappings!"];
     }
   }
   
diff --git a/sope-appserver/NGObjWeb/WORequestHandler.m b/sope-appserver/NGObjWeb/WORequestHandler.m
index 4a96f5c8..88866feb 100644
--- a/sope-appserver/NGObjWeb/WORequestHandler.m
+++ b/sope-appserver/NGObjWeb/WORequestHandler.m
@@ -46,18 +46,30 @@
 
 @implementation WORequestHandler
 
-static BOOL  doNotSetCookiePath = NO;
-static BOOL  perflog = NO;
-static Class NSDateClass = Nil;
+static BOOL     doNotSetCookiePath = NO;
+static Class    NSDateClass        = Nil;
+static NGLogger *logger            = nil;
+static NGLogger *perfLogger        = nil;
 
 + (int)version {
   return 2;
 }
 + (void)initialize {
-  NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
-  
+  NSUserDefaults  *ud;
+  NGLoggerManager *lm;
+  static BOOL didInit = NO;
+
+  if (didInit)
+    return;
+  didInit = YES;
+
   NSDateClass = [NSDate class];
-  perflog            = [ud boolForKey:@"WOProfileRequestHandler"];
+
+  lm         = [NGLoggerManager defaultLoggerManager];
+  logger     = [lm loggerForClass:self];
+  perfLogger = [lm loggerForDefaultKey:@"WOProfileRequestHandler"];
+
+  ud                 = [NSUserDefaults standardUserDefaults];
   doNotSetCookiePath = [ud boolForKey:@"WOUseGlobalCookiePath"];
 }
 
@@ -142,7 +154,7 @@ static Class NSDateClass = Nil;
     }
   }
   
-  if (perflog)
+  if (perfLogger)
     startHandling = [[NSDateClass date] timeIntervalSince1970];
   
   thread = [NSThread currentThread];
@@ -159,7 +171,7 @@ static Class NSDateClass = Nil;
   {
     /* setup context */
     context = [WOContext contextWithRequest:_request];
-    NSAssert(context,    @"no context assigned ..");
+    NSAssert(context, @"no context assigned ..");
     [app _setCurrentContext:context];
     
     /* check session id */
@@ -236,7 +248,7 @@ static Class NSDateClass = Nil;
         
         if (session != nil) {
           if ([session storesIDsInCookies]) {
-	    [self debugWithFormat:@"add cookie to session: %@", session];
+            [self debugWithFormat:@"add cookie to session: %@", session];
             [self addCookiesForSession:session
                   toResponse:response
                   inContext:context];
@@ -247,8 +259,8 @@ static Class NSDateClass = Nil;
                 withResponse:response
                 application:app];
         }
-	else
-	  [self debugWithFormat:@"no session to store."];
+        else
+          [self debugWithFormat:@"no session to store."];
       }
       NS_HANDLER {
         response = [app handleException:localException inContext:context];
@@ -278,7 +290,7 @@ static Class NSDateClass = Nil;
   [app lock];
   if ([app isRefusingNewSessions] &&
       ([app activeSessionsCount] < [app minimumActiveSessionsCount])) {
-    [self debugWithFormat:
+    [self logWithFormat:
             @"application terminates because it refuses new sessions and "
             @"the active session count (%i) is below the minimum (%i).",
             [app activeSessionsCount], [app minimumActiveSessionsCount]];
@@ -286,10 +298,11 @@ static Class NSDateClass = Nil;
   }
   [app unlock];
   
-  if (perflog) {
+  if (perfLogger) {
     NSTimeInterval rt;
     rt = [[NSDateClass date] timeIntervalSince1970] - startHandling;
-    [self debugWithFormat:@"handleRequest took %4.3fs.", rt < 0.0 ? -1.0 : rt];
+    [perfLogger logWithFormat:@"handleRequest took %4.3fs.",
+                  rt < 0.0 ? -1.0 : rt];
   }
   
   return [response autorelease];
@@ -312,6 +325,12 @@ static Class NSDateClass = Nil;
   return nil;
 }
 
+/* logging */
+
+- (id)logger {
+  return logger;
+}
+
 @end /* WORequestHandler */
 
 @implementation WORequestHandler(Cookies)
diff --git a/sope-appserver/NGObjWeb/WOResourceManager.m b/sope-appserver/NGObjWeb/WOResourceManager.m
index 32e73780..71d42975 100644
--- a/sope-appserver/NGObjWeb/WOResourceManager.m
+++ b/sope-appserver/NGObjWeb/WOResourceManager.m
@@ -143,7 +143,7 @@ _pathExists(WOResourceManager *self, NSFileManager *fm, NSString *path)
 - (id)initWithPath:(NSString *)_path {
 #if __APPLE__
   if ([_path length] == 0) {
-    NSLog(@"ERROR(%s): missing path!", __PRETTY_FUNCTION__);
+    [self errorWithFormat:@"(%s): missing path!", __PRETTY_FUNCTION__];
     /* this doesn't work with subclasses which do not require a path ... */
 #if 0
     [self release];
@@ -230,8 +230,8 @@ _pathExists(WOResourceManager *self, NSFileManager *fm, NSString *path)
   fm = [self fileManager];
   if ([self->base length] > 0) {
     if (![fm fileExistsAtPath:self->base]) {
-      NSLog(@"WARNING(%s): Resources base path '%@' does not exist !",
-            __PRETTY_FUNCTION__, self->base);
+      [self warnWithFormat:@"(%s): Resources base path '%@' does not exist !",
+              __PRETTY_FUNCTION__, self->base];
       return nil;
     }
   }
@@ -268,8 +268,8 @@ _pathExists(WOResourceManager *self, NSFileManager *fm, NSString *path)
   
   if ([self->resources length] > 0) {
     if (![fm fileExistsAtPath:self->resources]) {
-      [self debugWithFormat:
-              @"WARNING(%s): Resources path %@ does not exist !",
+      [self warnWithFormat:
+              @"(%s): Resources path %@ does not exist !",
               __PRETTY_FUNCTION__, self->resources];
       [self->resources release]; self->resources = nil;
     }
@@ -313,8 +313,8 @@ _pathExists(WOResourceManager *self, NSFileManager *fm, NSString *path)
     static BOOL didLog = NO;
     if (!didLog) {
       didLog = YES;
-      [self debugWithFormat:
-              @"WARNING(%s): WebServerResources path '%@' does not exist !",
+      [self warnWithFormat:
+              @"(%s): WebServerResources path '%@' does not exist !",
               __PRETTY_FUNCTION__, self->w3resources];
     }
     [self->w3resources release]; self->w3resources = nil;
@@ -606,8 +606,9 @@ _pathExists(WOResourceManager *self, NSFileManager *fm, NSString *path)
   
   if (_name == nil) {
 #if DEBUG
-    NSLog(@"WARNING(%s): tried to get path to component with  name !",
-          __PRETTY_FUNCTION__);
+    [self warnWithFormat:
+            @"(%s): tried to get path to component with  name !",
+            __PRETTY_FUNCTION__];
 #endif
     return nil;
   }
@@ -861,8 +862,8 @@ _pathExists(WOResourceManager *self, NSFileManager *fm, NSString *path)
     }
     
     if (!isDirectory) {
-      NSLog(@"WARNING(%s): language entry %@ is not a directory !",
-                  __PRETTY_FUNCTION__, languagePath);
+      [self warnWithFormat:@"(%s): language entry %@ is not a directory !",
+              __PRETTY_FUNCTION__, languagePath];
             if (doesCache && (compoundKey != nil)) {
               // register null in cache, so that we know it's non-existent
               NSMapInsert(self->componentDefinitions, compoundKey, null);
@@ -879,9 +880,10 @@ _pathExists(WOResourceManager *self, NSFileManager *fm, NSString *path)
                        baseURL:[NSURL URLWithString:baseUrl]
                        frameworkName:nil];
     if (cdef == nil) {
-            NSLog(@"WARNING(%s): could not load component definition of "
-                  @"'%@' from language project: %@", 
-                  __PRETTY_FUNCTION__, _name, languagePath);
+            [self warnWithFormat:
+                    @"(%s): could not load component definition of "
+                    @"'%@' from language project: %@", 
+                    __PRETTY_FUNCTION__, _name, languagePath];
             if (doesCache && (compoundKey != nil)) {
               // register null in cache, so that we know it's non-existent
               NSMapInsert(self->componentDefinitions, compoundKey, null);
@@ -981,9 +983,10 @@ _pathExists(WOResourceManager *self, NSFileManager *fm, NSString *path)
                  baseURL:[NSURL URLWithString:baseUrl]
                  frameworkName:nil];
     if (cdef == nil) {
-      NSLog(@"WARNING(%s): could not load component definition of '%@' from "
-            @"component wrapper: '%@'", 
-            __PRETTY_FUNCTION__, _name, componentURL);
+      [self warnWithFormat:
+              @"(%s): could not load component definition of '%@' from "
+              @"component wrapper: '%@'", 
+              __PRETTY_FUNCTION__, _name, componentURL];
       if (doesCache) {
         /* register null in cache, so that we know it's non-existent */
         NSMapInsert(self->componentDefinitions, componentURL, null);
diff --git a/sope-appserver/NGObjWeb/WORunLoop.m b/sope-appserver/NGObjWeb/WORunLoop.m
index 68a2139c..403fc660 100644
--- a/sope-appserver/NGObjWeb/WORunLoop.m
+++ b/sope-appserver/NGObjWeb/WORunLoop.m
@@ -18,7 +18,7 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
+// $Id: WORunLoop.m 1 2004-08-20 10:08:27Z znek $
 
 #include "WORunLoop.h"
 #include "common.h"
@@ -62,10 +62,10 @@
 
 #if 0
 typedef enum {
-    NSPosixNoActivity = 0,
-    NSPosixReadableActivity = 1,
-    NSPosixWritableActivity = 2,
-    NSPosixExceptionalActivity = 4
+  NSPosixNoActivity = 0,
+  NSPosixReadableActivity = 1,
+  NSPosixWritableActivity = 2,
+  NSPosixExceptionalActivity = 4
 } NSPosixFileActivities;
 #endif
 
@@ -73,21 +73,21 @@ NSString* NSFileObjectBecameActiveNotificationName =
   @"NSFileObjectBecameActiveNotificationName";
 
 static char *activityDesc[8] = {
-    "---", // 0
-    "--R", // 1
-    "-W-", // 2
-    "-WR", // 3
-    "E--", // 4
-    "E-R", // 5
-    "EW-", // 6
-    "EWR"  // 7
+  "---", // 0
+  "--R", // 1
+  "-W-", // 2
+  "-WR", // 3
+  "E--", // 4
+  "E-R", // 5
+  "EW-", // 6
+  "EWR"  // 7
 };
 
 @interface WORunLoopFileObjectInfo : NSObject
 {
-    id                    fileObject;
-    NSPosixFileActivities watchedActivities;
-    BOOL                  canCheckAlive;
+  id                    fileObject;
+  NSPosixFileActivities watchedActivities;
+  BOOL                  canCheckAlive;
 }
 
 - (id)initWithFileObject:(id)_fileObject
@@ -113,53 +113,53 @@ static char *activityDesc[8] = {
 }
 - (id)init
 {
-      NSLog(@"ERROR: do not use init with WORunLoopFileObjectInfo ..");
-      AUTORELEASE(self);
-      return nil;
+  [self errorWithFormat:@"do not use init with WORunLoopFileObjectInfo .."];
+  AUTORELEASE(self);
+  return nil;
 }
 
 - (void)dealloc
 {
-    RELEASE(self->fileObject); self->fileObject = nil;
-    [super dealloc];
+  RELEASE(self->fileObject); self->fileObject = nil;
+  [super dealloc];
 }
 
 - (BOOL)isEqual:(WORunLoopFileObjectInfo*)otherInfo
 {
-    return [self->fileObject isEqual:otherInfo->fileObject];
+  return [self->fileObject isEqual:otherInfo->fileObject];
 }
 
 - (BOOL)isAlive {
-    return (self->canCheckAlive) ? [self->fileObject isAlive] : YES;
+  return (self->canCheckAlive) ? [self->fileObject isAlive] : YES;
 }
 - (int)fileDescriptor
 {
-    return [self->fileObject fileDescriptor];
+  return [self->fileObject fileDescriptor];
 }
 
 - (NSPosixFileActivities)watchedActivities
 {
-    return self->watchedActivities;
+  return self->watchedActivities;
 }
 
 - (void)activity:(NSPosixFileActivities)_activity onDescriptor:(int)_fd
 {
-    //NSLog(@"FileObject %@ was active ..", self->fileObject);
+  //NSLog(@"FileObject %@ was active ..", self->fileObject);
     
-    [[NSNotificationCenter defaultCenter]
-                           postNotificationName:
-                             NSFileObjectBecameActiveNotificationName
-                           object:self->fileObject];
+  [[NSNotificationCenter defaultCenter]
+                         postNotificationName:
+                           NSFileObjectBecameActiveNotificationName
+                         object:self->fileObject];
 }
 
 - (NSString *)description
 {
-    return [NSString stringWithFormat:
-                       @"<%@[0x%08X]: object=%@ actitivity=%s>",
-                       NSStringFromClass([self class]), self,
-                       self->fileObject,
-                       activityDesc[self->watchedActivities]
-                     ];
+  return [NSString stringWithFormat:
+                     @"<%@[0x%08X]: object=%@ actitivity=%s>",
+                     NSStringFromClass([self class]), self,
+                     self->fileObject,
+                     activityDesc[self->watchedActivities]
+                   ];
 }
 
 @end
@@ -372,15 +372,15 @@ static BOOL      taskIsMultithreaded = NO;
 
 + (NSRunLoop *)currentRunLoop
 {
-    if (taskIsMultithreaded) {
-        NSLog(@"WORunLoop does not work multithreaded, exit ..");
-        return nil;
-    }
-    else {
-	if (!currentRunLoop)
+  if (taskIsMultithreaded) {
+    NSLog(@"WORunLoop does not work multithreaded, exit ..");
+    return nil;
+  }
+  else {
+    if (!currentRunLoop)
 	    currentRunLoop = [[self alloc] init];
-	return currentRunLoop;
-    }
+    return currentRunLoop;
+  }
 }
 
 - (id)init {
@@ -654,13 +654,13 @@ static int compare_fire_dates(id timer1, id timer2, void* userData)
                 }
             }
             if (r > 0) {
-                NSLog(@"WARNING: could not resolve all activities (%i) ..",
+              [self warnWithFormat:@"could not resolve all activities (%i) ..",
                       r);
             }
 	}
         NS_HANDLER {
-	  NSLog(format, __PRETTY_FUNCTION__,
-                [localException name], [localException reason]);
+          [self errorWithFormat:format, __PRETTY_FUNCTION__,
+                  [localException name], [localException reason]];
 	}
         NS_ENDHANDLER;
 
diff --git a/sope-appserver/NGObjWeb/WOServerSessionStore.m b/sope-appserver/NGObjWeb/WOServerSessionStore.m
index 81f4f6ef..859a78dc 100644
--- a/sope-appserver/NGObjWeb/WOServerSessionStore.m
+++ b/sope-appserver/NGObjWeb/WOServerSessionStore.m
@@ -18,7 +18,7 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
+// $Id: WOServerSessionStore.m 1 2004-08-20 10:08:27Z znek $
 
 #include 
 
@@ -161,8 +161,7 @@ static BOOL logExpiredSessions = NO;
     return nil;
   
   if (![_sid isKindOfClass:[NSString class]]) {
-    [self logWithFormat:
-	    @"WARNING(%s): got invalid session id (expected string !): %@",
+    [self warnWithFormat:@"%s: got invalid session id (expected string !): %@",
             __PRETTY_FUNCTION__, _sid];
     return nil;
   }
diff --git a/sope-appserver/NGObjWeb/WOSimpleHTTPParser.m b/sope-appserver/NGObjWeb/WOSimpleHTTPParser.m
index 595a8ecd..304f92d5 100644
--- a/sope-appserver/NGObjWeb/WOSimpleHTTPParser.m
+++ b/sope-appserver/NGObjWeb/WOSimpleHTTPParser.m
@@ -66,8 +66,9 @@ static int   maxUploadSize  = 0;
     self->readBytes = (void *)
       [(NSObject *)self->io methodForSelector:@selector(readBytes:count:)];
     if (self->readBytes == NULL) {
-      NSLog(@"WARNING(%s): got invalid stream object: %@", __PRETTY_FUNCTION__,
-	    self->io);
+      [self warnWithFormat:@"(%s): got invalid stream object: %@",
+        __PRETTY_FUNCTION__,
+	      self->io];
       [self release];
       return nil;
     }
@@ -132,9 +133,9 @@ static int   maxUploadSize  = 0;
 	static BOOL didLog = NO;
 	if (!didLog) {
 	  didLog = YES;
-	  NSLog(@"WARNING(%s): reallocated the HTTP line buffer %i times, "
-		@"consider increasing the default line buffer size!",
-		__PRETTY_FUNCTION__, reallocCount);
+	  [self warnWithFormat:@"(%s): reallocated the HTTP line buffer %i times, "
+            @"consider increasing the default line buffer size!",
+            __PRETTY_FUNCTION__, reallocCount];
 	}
       }
       
@@ -464,16 +465,16 @@ static NSString *stringForHeaderName(unsigned char *p) {
     
     if (*p == ' ' || *p == '\t') {
       // TODO: implement folding (remember last header-key, add string)
-      [self logWithFormat:
-              @"ERROR(%s): got a folded HTTP header line, cannot process!",
-	      __PRETTY_FUNCTION__];
+      [self errorWithFormat:
+              @"(%s): got a folded HTTP header line, cannot process!",
+              __PRETTY_FUNCTION__];
       continue;
     }
     
     /* find key/value separator */
     if ((v = index(p, ':')) == NULL) {
-      [self logWithFormat:@"WARNING: got malformed header line: '%s'",
-	      self->lineBuffer];
+      [self warnWithFormat:@"got malformed header line: '%s'",
+              self->lineBuffer];
       continue;
     }
     
@@ -541,9 +542,8 @@ static NSString *stringForHeaderName(unsigned char *p) {
 	readToEOF = NO;
       
       if (readToEOF) {
-	[self logWithFormat:
-		@"WARNING: not processing entity of request "
-	        @"without contentlen!"];
+        [self warnWithFormat:
+                @"not processing entity of request without contentlen!"];
       }
     }
   }
@@ -570,7 +570,7 @@ static NSString *stringForHeaderName(unsigned char *p) {
     fn = [[NSProcessInfo processInfo] temporaryFileName];
     
     if ((t = fopen([fn cString], "w")) == NULL) {
-      [self logWithFormat:@"ERROR: could not open temporary file '%@'!", fn];
+      [self errorWithFormat:@"could not open temporary file '%@'!", fn];
       
       /* read into memory as a fallback ... */
       
diff --git a/sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.m b/sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.m
index 0c85952d..df15f440 100644
--- a/sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.m
+++ b/sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.m
@@ -468,7 +468,7 @@ static BOOL heavyLog = NO;
     else {
       q = [self->qualifiers objectAtIndex:0];
       if (cnt != 1) {
-        [self logWithFormat:@"WARNING: to many subqualifiers in not !: %@",
+        [self warnWithFormat:@"too many subqualifiers in not !: %@",
                 self->qualifiers];
       }
     }
@@ -491,7 +491,7 @@ static BOOL heavyLog = NO;
   [self->qualifiers release]; self->qualifiers = nil;
   
   if ((stackSize = [self->compoundQualStack count]) == 0) {
-    [self logWithFormat:@"ERROR: the qualifier stack is mixed up !"];
+    [self errorWithFormat:@"the qualifier stack is mixed up !"];
   }
   else if (stackSize > 1) {
     /* this one was not the root qualifier */
@@ -553,8 +553,7 @@ static BOOL heavyLog = NO;
       [self->propSet setObject:t forKey:fqn];
     else {
       [self->propSet setObject:[NSNull null] forKey:fqn];
-      [self logWithFormat:
-	      @"ERROR: lost the parsing cdata (broken nesting) ?!"];
+      [self errorWithFormat:@"lost the parsing cdata (broken nesting) ?!"];
     }
     [t release];
   }
diff --git a/sope-appserver/NGObjWeb/WebDAV/SoDAVSQLParser.m b/sope-appserver/NGObjWeb/WebDAV/SoDAVSQLParser.m
index 9518b97b..dd3294a7 100644
--- a/sope-appserver/NGObjWeb/WebDAV/SoDAVSQLParser.m
+++ b/sope-appserver/NGObjWeb/WebDAV/SoDAVSQLParser.m
@@ -87,8 +87,8 @@
   for (i = 0, didReplace = NO; i < len; i++) {
     if (buf[i] != '%') {
       if (buf[i] == '*') {
-        NSLog(@"WARNING(%s): SQL string contains a '*': %@",
-              __PRETTY_FUNCTION__, _sql);
+        [self warnWithFormat:@"(%s): SQL string contains a '*': %@",
+                __PRETTY_FUNCTION__, _sql];
       }
       continue;
     }
@@ -719,7 +719,7 @@ static inline BOOL isTokStopChar(unichar c) {
   
   NSLog(@"  FS: %@", fs);
   if (fs == nil) {
-    NSLog(@"  ERROR: could not parse SQL: %@", sql);
+    [self errorWithFormat:@"  could not parse SQL: %@", sql];
   }
   else {
     EOQualifier *q;
diff --git a/sope-appserver/NGObjWeb/WebDAV/SoObject+SoDAV.m b/sope-appserver/NGObjWeb/WebDAV/SoObject+SoDAV.m
index 2219fe65..b4eeb90c 100644
--- a/sope-appserver/NGObjWeb/WebDAV/SoObject+SoDAV.m
+++ b/sope-appserver/NGObjWeb/WebDAV/SoObject+SoDAV.m
@@ -161,12 +161,11 @@
     url = [self baseURL];
   }
   else {
-    [self logWithFormat:
-            @"WARNING: unable to calculate davURL for this object !"];
+    [self warnWithFormat:@"unable to calculate davURL for this object !"];
     url = nil;
   }
   if (url == nil)
-    [self logWithFormat:@"WARNING: got no davURL for this object !"];
+    [self warnWithFormat:@"got no davURL for this object !"];
   
   return url;
 }
diff --git a/sope-appserver/NGObjWeb/WebDAV/SoObject+SoDAVQuery.m b/sope-appserver/NGObjWeb/WebDAV/SoObject+SoDAVQuery.m
index 87275dc7..a416d944 100644
--- a/sope-appserver/NGObjWeb/WebDAV/SoObject+SoDAVQuery.m
+++ b/sope-appserver/NGObjWeb/WebDAV/SoObject+SoDAVQuery.m
@@ -172,8 +172,7 @@ static int debugBulk = NO; // TODO: set to -1 and use defaults
 	 If the results came from SoObjectDataSource this is possible because
 	 the "full" object is none in the SoObjectResultEntry.
       */
-      [self logWithFormat:
-	      @"WARNING: attempted deep-search, not supported yet."];
+      [self warnWithFormat:@"attempted deep-search, not supported yet."];
     }    
     result = ma;
   }
@@ -217,8 +216,7 @@ static int debugBulk = NO; // TODO: set to -1 and use defaults
       /* simple key, just use -lookupName */
       child = [self lookupName:key inContext:_ctx acquire:NO];
       if (child == nil) {
-        [self logWithFormat:@"ERROR: did not find the BPROPFIND target '%@'",
-	        key];
+        [self errorWithFormat:@"did not find the BPROPFIND target '%@'", key];
         continue;
       }
     }
@@ -227,9 +225,9 @@ static int debugBulk = NO; // TODO: set to -1 and use defaults
       // TODO: pass auth parameters to traversal context !!
       child = [self traversePath:key acquire:NO];
       if (child == nil) {
-        [self logWithFormat:
-                @"ERROR: did not find the BPROPFIND target '%@' by traversing.",
-	        key];
+        [self errorWithFormat:
+                @"did not find the BPROPFIND target '%@' by traversing.",
+                key];
         continue;
       }
       if ([child isKindOfClass:[NSException class]]) {
@@ -305,7 +303,7 @@ static int debugBulk = NO; // TODO: set to -1 and use defaults
   if ([scope hasPrefix:@"deep"])
     return [self performWebDAVDeepQuery:_fs inContext:_ctx];
   
-  [self logWithFormat:@"ERROR: called with invalid scope '%@'", scope];
+  [self errorWithFormat:@"called with invalid scope '%@'", scope];
   return nil;
 }
 
diff --git a/sope-appserver/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m b/sope-appserver/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m
index 463f7495..c54fd195 100644
--- a/sope-appserver/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m
+++ b/sope-appserver/NGObjWeb/WebDAV/SoObjectWebDAVDispatcher.m
@@ -595,7 +595,7 @@ static NSTimeZone                *gmt      = nil;
   setProps = [setProps autorelease];
   
   if (delProps == nil && setProps == nil) {
-    [self logWithFormat:@"WARNING: got no properties in PROPPATCH !"];
+    [self warnWithFormat:@"got no properties in PROPPATCH !"];
     return [self httpException:400 /* bad request */
 		 reason:@"got no properties in PROPPATCH !"];
   }
@@ -725,13 +725,11 @@ static NSTimeZone                *gmt      = nil;
   ifValue   = [rq headerForKey:@"if"];
   
   if (lockDepth != nil && ![lockDepth isEqualToString:@"0"]) {
-    [self logWithFormat:
-	    @"WARNING: 'depth' locking not supported yet (depth=%@)!", 
-	    lockDepth];
+    [self warnWithFormat:@"'depth' locking not supported yet (depth=%@)!", 
+            lockDepth];
   }
   if (ifValue) {
-    [self logWithFormat:
-	    @"WARNING: 'if' locking not supported yet, if: '%@'", ifValue];
+    [self warnWithFormat:@"'if' locking not supported yet, if: '%@'", ifValue];
   }
   
   // need to parse lockinfo
@@ -1117,7 +1115,7 @@ static NSTimeZone                *gmt      = nil;
     NSURL *url;
     
     if ((url = [NSURL URLWithString:[callback stringValue]]) == nil) {
-      [self debugWithFormat:@"ERROR: could not parse callback URL '%@'", 
+      [self errorWithFormat:@"could not parse callback URL '%@'", 
               callback];
       return [self httpException:400 /* Bad Request */
                    reason:@"missing valid callback URL !"];
@@ -1211,8 +1209,8 @@ static NSTimeZone                *gmt      = nil;
 	if (debugBulkTarget) [self logWithFormat:@"path: %@", target];
       }
       else {
-	[self logWithFormat:@"ERROR: could not parse BPROPFIND target '%@' !",
-	        target];
+        [self errorWithFormat:@"could not parse BPROPFIND target '%@' !",
+                target];
       }
     }
     
@@ -1365,14 +1363,13 @@ static NSTimeZone                *gmt      = nil;
       /* setup the "subrequest" */
       
       if ([targetURL isAbsoluteURL]) {
-	NSURL *url;
-	
-	if ((url = [NSURL URLWithString:targetURL]))
-	  targetURL = [url path];
-	else {
-	  [self logWithFormat:@"ERROR: could not parse target-url '%@'",
-		  targetURL];
-	}
+        NSURL *url;
+        
+        if ((url = [NSURL URLWithString:targetURL]))
+          targetURL = [url path];
+        else {
+          [self errorWithFormat:@"could not parse target-url '%@'", targetURL];
+        }
       }
       
       localRequest = [[WORequest alloc] initWithMethod:@"PROPFIND"
@@ -1382,7 +1379,7 @@ static NSTimeZone                *gmt      = nil;
 					content:nil
 					userInfo:nil];
       localContext = 
-	[[[WOContext alloc] initWithRequest:localRequest] autorelease];
+        [[[WOContext alloc] initWithRequest:localRequest] autorelease];
       [localRequest autorelease];
       
       /* resetup fetchspec */
@@ -1397,32 +1394,32 @@ static NSTimeZone                *gmt      = nil;
 				   error:&e
 				   acquire:NO];
       if (targetObject == nil) {
-	[self logWithFormat:@"did not find BPROPFIND target: %@", targetURL];
-	[self logWithFormat:@"  root:   %@", [_ctx traversalRoot]];
-	[self logWithFormat:@"  path:   %@", 
+        [self logWithFormat:@"did not find BPROPFIND target: %@", targetURL];
+        [self logWithFormat:@"  root:   %@", [_ctx traversalRoot]];
+        [self logWithFormat:@"  path:   %@", 
 	        [[localRequest requestHandlerPathArray] 
 		               componentsJoinedByString:@"/"]];
-	[self logWithFormat:@"  error:  %@", e];
-	targetResult = e;
+        [self logWithFormat:@"  error:  %@", e];
+        targetResult = e;
       }
       else {
-	/* perform query */
+        /* perform query */
 	
-	targetResult = [targetObject performWebDAVQuery:fs 
-				     inContext:localContext];
-	if (targetResult == nil) {
-	  targetResult = 
-	    [self httpException:500 /* Server Error */
-		  reason:@"could not perform query (object returned nil)"];
-	}
+        targetResult = [targetObject performWebDAVQuery:fs 
+                                              inContext:localContext];
+        if (targetResult == nil) {
+          targetResult = 
+          [self httpException:500 /* Server Error */
+                reason:@"could not perform query (object returned nil)"];
+        }
       }
       
       // do we need to distinguish the queries somehow ? (href generation)
       if ([targetResult isKindOfClass:[NSArray class]])
-	[result addObjectsFromArray:targetResult];
+        [result addObjectsFromArray:targetResult];
       else if (targetResult)
-	[result addObject:targetResult];
-      
+        [result addObject:targetResult];
+
       [pool release];
     }
   }
diff --git a/sope-appserver/NGObjWeb/WebDAV/SoWebDAVRenderer.m b/sope-appserver/NGObjWeb/WebDAV/SoWebDAVRenderer.m
index 1afcb9fe..4141805d 100644
--- a/sope-appserver/NGObjWeb/WebDAV/SoWebDAVRenderer.m
+++ b/sope-appserver/NGObjWeb/WebDAV/SoWebDAVRenderer.m
@@ -203,7 +203,7 @@ static BOOL         formatOutput = NO;
     return YES;
   }
   
-  [self logWithFormat:@"ERROR: don't know how to render: %@", _object];
+  [self errorWithFormat:@"don't know how to render: %@", _object];
   return NO;
 }
 
@@ -454,9 +454,9 @@ static BOOL         formatOutput = NO;
   
   if (href == nil) {
     if (debugOn) {
-      [self logWithFormat:
-              @"WARNING: using baseURL for href, "
-              @"entry did not provide a URL: %@", baseURL];
+      [self warnWithFormat:
+              @"using baseURL for href, entry did not provide a URL: %@",
+              baseURL];
     }
     href = [baseURL stringValue];
   }
@@ -515,15 +515,13 @@ static BOOL         formatOutput = NO;
       if ((key = [_propMap objectForKey:@"{DAV:}href"]) != nil) {
         if ((href = [entry valueForKey:key]) == nil) {
           if (debugOn) {
-            [self debugWithFormat:
-  		  @"WARNING: no value for {DAV:}href key '%@': %@",
-                    key, entry];
+            [self warnWithFormat:
+                    @"no value for {DAV:}href key '%@': %@", key, entry];
   	}
         }
       }
       else if (debugOn) {
-        [self debugWithFormat:
-  	      @"WARNING: no key for {DAV:}href in property map !"];
+        [self warnWithFormat:@"no key for {DAV:}href in property map !"];
       }
     }
     if ((stat = [entry valueForKey:@"{DAV:}status"]) == nil) {
@@ -570,8 +568,7 @@ static BOOL         formatOutput = NO;
     if (formatOutput) [r appendContentCharacter:'\n'];
   }
   else {
-    [self logWithFormat:
-	    @"WARNING: WebDAV result entry has no valid href: %@", entry];
+    [self warnWithFormat:@"WebDAV result entry has no valid href: %@", entry];
   }
   
   [r appendContentString:@""];
diff --git a/sope-appserver/NGObjWeb/WebDAV/WebDAV.xcode/project.pbxproj b/sope-appserver/NGObjWeb/WebDAV/WebDAV.xcode/project.pbxproj
index 6e7f9dca..ef181380 100644
--- a/sope-appserver/NGObjWeb/WebDAV/WebDAV.xcode/project.pbxproj
+++ b/sope-appserver/NGObjWeb/WebDAV/WebDAV.xcode/project.pbxproj
@@ -229,7 +229,7 @@
 			);
 			buildSettings = {
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 4.5.84;
+				DYLIB_CURRENT_VERSION = 4.5.91;
 				FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks";
 				FRAMEWORK_VERSION = A;
 				GCC_PRECOMPILE_PREFIX_HEADER = NO;
diff --git a/sope-appserver/NGObjWeb/_WOStringTable.m b/sope-appserver/NGObjWeb/_WOStringTable.m
index 59b14364..afa4a7ea 100644
--- a/sope-appserver/NGObjWeb/_WOStringTable.m
+++ b/sope-appserver/NGObjWeb/_WOStringTable.m
@@ -79,8 +79,7 @@ static NSStringEncoding stringFilesEncoding = NSISOLatin1StringEncoding;
   /* If file was not a dictionary, then it's a standard strings file */
   
   if ((sdata = [[NSData alloc] initWithContentsOfFile:self->path]) == nil) {
-    [self debugWithFormat:@"ERROR: could not read strings file: %@", 
-	  self->path];
+    [self errorWithFormat:@"could not read strings file: %@", self->path];
     self->data = nil;
     return;
   }
@@ -88,17 +87,17 @@ static NSStringEncoding stringFilesEncoding = NSISOLatin1StringEncoding;
   tmp = [[NSString alloc] initWithData:sdata encoding:stringFilesEncoding];
   [sdata release]; sdata = nil;
   if (tmp == nil) {
-    [self logWithFormat:@"ERROR: file is not in required encoding (%d): %@",
-	  stringFilesEncoding, self->path];
+    [self errorWithFormat:@"file is not in required encoding (%d): %@",
+            stringFilesEncoding, self->path];
     self->data = nil;
     return;
   }
   
   NS_DURING {
     if ((plist = [tmp propertyListFromStringsFileFormat]) == nil) {
-      NSLog(@"%s: could not load strings file '%@'",
-            __PRETTY_FUNCTION__,
-            self->path);
+      [self errorWithFormat:@"%s: could not load strings file '%@'",
+              __PRETTY_FUNCTION__,
+              self->path];
     }
     [tmp release]; tmp = nil;
     self->data = [plist copy];
diff --git a/sope-appserver/NGObjWeb/common.h b/sope-appserver/NGObjWeb/common.h
index def16c9b..d1174d3f 100644
--- a/sope-appserver/NGObjWeb/common.h
+++ b/sope-appserver/NGObjWeb/common.h
@@ -60,8 +60,8 @@
 #endif
 
 #define IS_DEPRECATED \
-  NSLog(@"WARNING: used deprecated method: %s:%i.", \
-        __PRETTY_FUNCTION__, __LINE__);
+  [self warnWithFormat:@"used deprecated method: %s:%i.", \
+          __PRETTY_FUNCTION__, __LINE__];
 
 #if PROFILE
 #  define BEGIN_PROFILE \
diff --git a/sope-core/NGExtensions/ChangeLog b/sope-core/NGExtensions/ChangeLog
index 14cbf110..5ebd4ecc 100644
--- a/sope-core/NGExtensions/ChangeLog
+++ b/sope-core/NGExtensions/ChangeLog
@@ -1,3 +1,17 @@
+2004-11-18  Marcus Mueller  
+
+	* v4.5.134
+
+	* NGLogging: updated
+
+	* NGExtensions/NSObject+Logs.h, FdExt.subproj/NSObject+Logs.m:
+	  changed existing implementation to use NGLogging by default. Added
+	  some more methods to support different log levels. Also added
+	  -logger and -debugLogger which are used to provide the default
+	  loggers for the desired purpose.
+
+	* FdExt.subproj/NGBundleManager.m: fixed wrong include
+
 2004-11-17  Helge Hess  
 
 	* NGBundleManager.m: fixed a bug in the bundle type check when the
diff --git a/sope-core/NGExtensions/FdExt.subproj/NSObject+Logs.m b/sope-core/NGExtensions/FdExt.subproj/NSObject+Logs.m
index 0297de05..f6c77231 100644
--- a/sope-core/NGExtensions/FdExt.subproj/NSObject+Logs.m
+++ b/sope-core/NGExtensions/FdExt.subproj/NSObject+Logs.m
@@ -20,6 +20,8 @@
 */
 
 #include "NSObject+Logs.h"
+#include "NGLoggerManager.h"
+#include "NGLogger.h"
 #include "common.h"
 
 @implementation NSObject(NGLogs)
@@ -38,46 +40,125 @@ static inline Class NSStringClass(void) {
   return NO;
 #endif
 }
+
+- (id)logger {
+  static id logger = nil;
+  
+  if (logger == nil) {
+    NGLoggerManager *lm;
+    
+    lm     = [NGLoggerManager defaultLoggerManager];
+    logger = [lm loggerForClass:[self class]];
+  }
+  return logger;
+}
+
+- (id)debugLogger {
+  return [self logger];
+}
+
 - (NSString *)loggingPrefix {
   /* improve perf ... */
   return [NSStringClass() stringWithFormat:@"<0x%08X[%@]>",
                        self, NSStringFromClass([self class])];
 }
 
-- (void)logWithFormat:(NSString *)_format arguments:(va_list)ap {
-  NSString *value = nil;
-  
-  value = [[NSStringClass() alloc] initWithFormat:_format arguments:ap];
-  NSLog(@"%@ %@", [self loggingPrefix], value);
-  [value release];
-}
 
-- (void)debugWithFormat:(NSString *)_format arguments:(va_list)ap {
+- (void)debugWithFormat:(NSString *)_fmt arguments:(va_list)_va {
 #if DEBUG
-  NSString *value = nil;
+  NSString *msg;
   
   if (![self isDebuggingEnabled]) return;
   
-  value = [[NSStringClass() alloc] initWithFormat:_format arguments:ap];
-  NSLog(@"<%@>D %@", [self loggingPrefix], value);
-  [value release];
+  msg = [[NSStringClass() alloc] initWithFormat:_fmt arguments:_va];
+  [[self debugLogger] debugWithFormat:@"<%@>D %@", [self loggingPrefix], msg];
+  [msg release];
 #else
 #  warning debug is disabled, debugWithFormat wont print anything ..
 #endif
 }
 
-- (void)logWithFormat:(NSString *)_format, ... {
+- (void)logWithFormat:(NSString *)_fmt arguments:(va_list)_va {
+  NGLogger *logger;
+  NSString *msg;
+  
+  logger = [self logger];
+  if (![logger isLogInfoEnabled]) return;
+
+  msg = [[NSStringClass() alloc] initWithFormat:_fmt arguments:_va];
+  [logger logWithFormat:@"%@ %@", [self loggingPrefix], msg];
+  [msg release];
+}
+
+- (void)warnWithFormat:(NSString *)_fmt arguments:(va_list)_va {
+  NGLogger *logger;
+  NSString *msg;
+
+  logger = [self logger];
+  if (![logger isLogWarnEnabled]) return;
+
+  msg = [[NSStringClass() alloc] initWithFormat:_fmt arguments:_va];
+  [logger warnWithFormat:@"%@ %@", [self loggingPrefix], msg];
+  [msg release];
+}
+
+- (void)errorWithFormat:(NSString *)_fmt arguments:(va_list)_va {
+  NGLogger *logger;
+  NSString *msg;
+  
+  logger = [self logger];
+  if (![logger isLogErrorEnabled]) return;
+
+  msg = [[NSStringClass() alloc] initWithFormat:_fmt arguments:_va];
+  [logger errorWithFormat:@"%@ %@", [self loggingPrefix], msg];
+  [msg release];
+}
+
+- (void)fatalWithFormat:(NSString *)_fmt arguments:(va_list)_va {
+  NGLogger *logger;
+  NSString *msg;
+  
+  logger = [self logger];
+  if (![logger isLogFatalEnabled]) return;
+
+  msg = [[NSStringClass() alloc] initWithFormat:_fmt arguments:_va];
+  [logger fatalWithFormat:@"%@ %@", [self loggingPrefix], msg];
+  [msg release];
+}
+
+- (void)debugWithFormat:(NSString *)_fmt, ... {
+  va_list ap;
+  
+  va_start(ap, _fmt);
+  [self debugWithFormat:_fmt arguments:ap];
+  va_end(ap);
+}
+- (void)logWithFormat:(NSString *)_fmt, ... {
+  va_list ap;
+  
+  va_start(ap, _fmt);
+  [self logWithFormat:_fmt arguments:ap];
+  va_end(ap);
+}
+- (void)warnWithFormat:(NSString *)_fmt, ... {
+  va_list ap;
+  
+  va_start(ap, _fmt);
+  [self warnWithFormat:_fmt arguments:ap];
+  va_end(ap);
+}
+- (void)errorWithFormat:(NSString *)_fmt, ... {
   va_list ap;
   
-  va_start(ap, _format);
-  [self logWithFormat:_format arguments:ap];
+  va_start(ap, _fmt);
+  [self errorWithFormat:_fmt arguments:ap];
   va_end(ap);
 }
-- (void)debugWithFormat:(NSString *)_format, ... {
+- (void)fatalWithFormat:(NSString *)_fmt, ... {
   va_list ap;
   
-  va_start(ap, _format);
-  [self debugWithFormat:_format arguments:ap];
+  va_start(ap, _fmt);
+  [self fatalWithFormat:_fmt arguments:ap];
   va_end(ap);
 }
 
diff --git a/sope-core/NGExtensions/GNUmakefile b/sope-core/NGExtensions/GNUmakefile
index f867f745..18d41da5 100644
--- a/sope-core/NGExtensions/GNUmakefile
+++ b/sope-core/NGExtensions/GNUmakefile
@@ -122,13 +122,13 @@ NGRuleEngine_HEADER_FILES = \
 
 NGLogging_HEADER_FILES = \
 	NGLogging.h			\
+	NGLogLevel.h			\
 	NGLogger.h			\
 	NGLoggerManager.h		\
 	NGLogEvent.h			\
 	NGLogAppender.h			\
 	NGLogConsoleAppender.h		\
 	NGLogSyslogAppender.h		\
-	NSObject+ExtendedLogging.h	\
 
 
 libNGExtensions_HEADER_FILES += \
diff --git a/sope-core/NGExtensions/NGBundleManager.m b/sope-core/NGExtensions/NGBundleManager.m
index 8edd9d4d..2a2489da 100644
--- a/sope-core/NGExtensions/NGBundleManager.m
+++ b/sope-core/NGExtensions/NGBundleManager.m
@@ -22,7 +22,7 @@
 #include "NGBundleManager.h"
 #include "common.h"
 #include 
-#include 
+#include 
 #import 
 #import 
 #include 
diff --git a/sope-core/NGExtensions/NGExtensions.xcode/project.pbxproj b/sope-core/NGExtensions/NGExtensions.xcode/project.pbxproj
index 648ce6af..9f873304 100644
--- a/sope-core/NGExtensions/NGExtensions.xcode/project.pbxproj
+++ b/sope-core/NGExtensions/NGExtensions.xcode/project.pbxproj
@@ -224,16 +224,7 @@
 			indentWidth = 2;
 			isa = PBXFileReference;
 			lastKnownFileType = sourcecode.c.h;
-			path = "NSObject+ExtendedLogging.h";
-			refType = 4;
-			sourceTree = "";
-		};
-		ADCD51450743BBE10071C1A1 = {
-			fileEncoding = 5;
-			indentWidth = 2;
-			isa = PBXFileReference;
-			lastKnownFileType = sourcecode.c.objc;
-			path = "NSObject+ExtendedLogging.m";
+			path = NGLogLevel.h;
 			refType = 4;
 			sourceTree = "";
 		};
@@ -330,12 +321,6 @@
 				);
 			};
 		};
-		ADCD51540743BBE10071C1A1 = {
-			fileRef = ADCD51450743BBE10071C1A1;
-			isa = PBXBuildFile;
-			settings = {
-			};
-		};
 		ADCD51570743BBE60071C1A1 = {
 			children = (
 				ADCD51380743BBE10071C1A1,
@@ -348,13 +333,13 @@
 		ADCD515A0743BBF00071C1A1 = {
 			children = (
 				ADCD51410743BBE10071C1A1,
+				ADCD51440743BBE10071C1A1,
 				ADCD513F0743BBE10071C1A1,
 				ADCD52020743D8CA0071C1A1,
 				ADCD513D0743BBE10071C1A1,
 				ADCD51390743BBE10071C1A1,
 				ADCD513B0743BBE10071C1A1,
 				ADCD51420743BBE10071C1A1,
-				ADCD51440743BBE10071C1A1,
 			);
 			fileEncoding = 5;
 			indentWidth = 2;
@@ -372,7 +357,6 @@
 				ADCD513A0743BBE10071C1A1,
 				ADCD513C0743BBE10071C1A1,
 				ADCD51430743BBE10071C1A1,
-				ADCD51450743BBE10071C1A1,
 			);
 			isa = PBXGroup;
 			name = Classes;
@@ -1620,7 +1604,6 @@
 				ADCD514D0743BBE10071C1A1,
 				ADCD514F0743BBE10071C1A1,
 				ADCD51520743BBE10071C1A1,
-				ADCD51540743BBE10071C1A1,
 				ADCD52050743D8CA0071C1A1,
 			);
 			isa = PBXSourcesBuildPhase;
@@ -1650,7 +1633,7 @@
 			);
 			buildSettings = {
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 4.5.127;
+				DYLIB_CURRENT_VERSION = 4.5.134;
 				FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks";
 				FRAMEWORK_VERSION = A;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
diff --git a/sope-core/NGExtensions/NGExtensions/NGExtensions.h b/sope-core/NGExtensions/NGExtensions/NGExtensions.h
index 79ebc183..9a1f00e8 100644
--- a/sope-core/NGExtensions/NGExtensions/NGExtensions.h
+++ b/sope-core/NGExtensions/NGExtensions/NGExtensions.h
@@ -57,6 +57,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/sope-core/NGExtensions/NGExtensions/NGLogAppender.h b/sope-core/NGExtensions/NGExtensions/NGLogAppender.h
index 713413dc..6117a3fc 100644
--- a/sope-core/NGExtensions/NGExtensions/NGLogAppender.h
+++ b/sope-core/NGExtensions/NGExtensions/NGLogAppender.h
@@ -29,7 +29,7 @@
 */
 
 #import 
-#include  /* for LogLevel */
+#include 
 
 @class NGLogEvent;
 
diff --git a/sope-core/NGExtensions/NGExtensions/NGLogEvent.h b/sope-core/NGExtensions/NGExtensions/NGLogEvent.h
index 8b2f8b42..4277eff0 100644
--- a/sope-core/NGExtensions/NGExtensions/NGLogEvent.h
+++ b/sope-core/NGExtensions/NGExtensions/NGLogEvent.h
@@ -32,8 +32,7 @@
 
 #import 
 #import 
-
-#include  /* for NGLogLevel */
+#include 
 
 @class NSString;
 
diff --git a/sope-core/NGExtensions/NGExtensions/NGLogLevel.h b/sope-core/NGExtensions/NGExtensions/NGLogLevel.h
new file mode 100644
index 00000000..3b769ffa
--- /dev/null
+++ b/sope-core/NGExtensions/NGExtensions/NGLogLevel.h
@@ -0,0 +1,39 @@
+/*
+  Copyright (C) 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_NGLogLevel_H_
+#define	__NGExtensions_NGLogLevel_H_
+
+/*
+  Currently defined log levels.
+*/
+
+typedef enum {
+  NGLogLevelOff   = 0,
+  NGLogLevelFatal = 1,
+  NGLogLevelError = 2,
+  NGLogLevelWarn  = 3,
+  NGLogLevelInfo  = 4,
+  NGLogLevelDebug = 5,
+  NGLogLevelAll   = 6
+} NGLogLevel;
+
+#endif	/* __NGExtensions_NGLogLevel_H_ */
diff --git a/sope-core/NGExtensions/NGExtensions/NGLogger.h b/sope-core/NGExtensions/NGExtensions/NGLogger.h
index 72c86ef8..da894ebb 100644
--- a/sope-core/NGExtensions/NGExtensions/NGLogger.h
+++ b/sope-core/NGExtensions/NGExtensions/NGLogger.h
@@ -40,7 +40,7 @@
 */
 
 #import 
-#include 
+#include 
 
 @interface NGLogger : NSObject
 {
@@ -55,11 +55,19 @@
 - (void)setLogLevel:(NGLogLevel)_level;
 - (NGLogLevel)logLevel;
 
+
+  
 /* logging */
 
-- (void)logLevel:(NGLogLevel)_level message:(NSString *)_msg;
-- (void)logLevel:(NGLogLevel)_level withFormat:(NSString *)_fmt, ...;
 
+/* conditions */
+
+- (BOOL)isDebuggingEnabled;
+- (BOOL)isLogInfoEnabled;
+- (BOOL)isLogWarnEnabled;
+- (BOOL)isLogErrorEnabled;
+- (BOOL)isLogFatalEnabled;
+  
 @end
 
 #endif	/* __NGExtensions_NGLogger_H_ */
diff --git a/sope-core/NGExtensions/NGExtensions/NGLoggerManager.h b/sope-core/NGExtensions/NGExtensions/NGLoggerManager.h
index f1e74ecf..34e65f88 100644
--- a/sope-core/NGExtensions/NGExtensions/NGLoggerManager.h
+++ b/sope-core/NGExtensions/NGExtensions/NGLoggerManager.h
@@ -50,9 +50,7 @@
 /* Retrieves a logger conditional to the existence of the given default key.
    In order to stay backwards compatible to existing applications, a boolean
    value auf YES associated with this key sets the default log level of this
-   logger to NGLogLevelDebug. Other possible values for this key include
-   "DEBUG, "INFO", "WARN", "ERROR" and "FATAL". Everything else will be mapped
-   to NGLogLevelAll. If the requested default key is not set, *nil* is
+   logger to NGLogLevelDebug. If the requested default key is not set, *nil* is
    returned.
 */
 - (NGLogger *)loggerForDefaultKey:(NSString *)_defaultKey;
diff --git a/sope-core/NGExtensions/NGExtensions/NGLogging.h b/sope-core/NGExtensions/NGExtensions/NGLogging.h
index efb4aac6..0cd278b3 100644
--- a/sope-core/NGExtensions/NGExtensions/NGLogging.h
+++ b/sope-core/NGExtensions/NGExtensions/NGLogging.h
@@ -29,7 +29,7 @@
   Documentation is currently provided in the headers only.
 */
 
-#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/sope-core/NGExtensions/NGExtensions/NSObject+ExtendedLogging.h b/sope-core/NGExtensions/NGExtensions/NSObject+ExtendedLogging.h
deleted file mode 100644
index 8fc860f2..00000000
--- a/sope-core/NGExtensions/NGExtensions/NSObject+ExtendedLogging.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-  Copyright (C) 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_
-
-/*
-  Logging convenience for the new NGLogger based API.
- 
-  The default implementation uses the "NGDefaultLogLevel" user default key to
-  retrieve a logger from the NGLoggerManager. If this default isn't set,
-  a default logger with log level NGLogLevelInfo will be instantiated.
- 
-  Consult the header of NGLoggerManager for further details on setting the
-  "NGDefaultLogLevel" user default.
-*/
-
-#import 
-
-typedef enum {
-  NGLogLevelOff   = 0,
-  NGLogLevelFatal = 1,
-  NGLogLevelError = 2,
-  NGLogLevelWarn  = 3,
-  NGLogLevelInfo  = 4,
-  NGLogLevelDebug = 5,
-  NGLogLevelAll   = 6
-} NGLogLevel;
-
-@interface NSObject(NGExtendedLogging)
-
-+ (id)logger;
-- (id)logger;
-
-/* convenience methods */
-
-- (void)logDebugWithFormat:(NSString *)_fmt, ...;
-- (void)logInfoWithFormat:(NSString *)_fmt, ...;
-- (void)logWarnWithFormat:(NSString *)_fmt, ...;
-- (void)logErrorWithFormat:(NSString *)_fmt, ...;
-- (void)logFatalWithFormat:(NSString *)_fmt, ...;
-
-/* conditions (try to avoid these, slow!) */
-
-- (BOOL)isLogDebugEnabled;
-- (BOOL)isLogInfoEnabled;
-- (BOOL)isLogWarnEnabled;
-- (BOOL)isLogErrorEnabled;
-- (BOOL)isLogFatalEnabled;
-
-/* generic methods */
-
-- (void)logLevel:(NGLogLevel)_level message:(NSString *)_msg;
-- (void)logLevel:(NGLogLevel)_level withFormat:(NSString *)_fmt, ...;
-
-@end
-
-#endif	/* __NSObject_ExtendedLogging_H_ */
diff --git a/sope-core/NGExtensions/NGExtensions/NSObject+Logs.h b/sope-core/NGExtensions/NGExtensions/NSObject+Logs.h
index 4900f388..a973a620 100644
--- a/sope-core/NGExtensions/NGExtensions/NSObject+Logs.h
+++ b/sope-core/NGExtensions/NGExtensions/NSObject+Logs.h
@@ -1,7 +1,7 @@
 /*
-  Copyright (C) 2000-2003 SKYRIX Software AG
+  Copyright (C) 2000-2004 SKYRIX Software AG
 
-  This file is part of OGo
+  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
@@ -18,7 +18,6 @@
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
 
 #ifndef __NGExtensions_NSObject_Logs_H__
 #define __NGExtensions_NSObject_Logs_H__
@@ -28,9 +27,16 @@
 
 @interface NSObject(NGLogs)
 
+/* default loggers for object */
+- (id)logger;
+- (id)debugLogger;
+
 /* "end user" methods, variable argument logging methods .. */
-- (void)logWithFormat:(NSString *)_format, ...;
-- (void)debugWithFormat:(NSString *)_format, ...;
+- (void)debugWithFormat:(NSString *)_fmt, ...;
+- (void)logWithFormat:(NSString *)_fmt, ...;
+- (void)warnWithFormat:(NSString *)_fmt, ...;
+- (void)errorWithFormat:(NSString *)_fmt, ...;
+- (void)fatalWithFormat:(NSString *)_fmt, ...;
 
 /* prefix, override that, to make a special logging prefix */
 - (NSString *)loggingPrefix;
@@ -39,8 +45,11 @@
 - (BOOL)isDebuggingEnabled;
 
 /*"designated" logging methods */
-- (void)logWithFormat:(NSString *)format   arguments:(va_list)argList;
-- (void)debugWithFormat:(NSString *)format arguments:(va_list)argList;
+- (void)debugWithFormat:(NSString *)_fmt arguments:(va_list)_va;
+- (void)logWithFormat:(NSString *)_fmt   arguments:(va_list)_va;
+- (void)warnWithFormat:(NSString *)_fmt  arguments:(va_list)_va;
+- (void)errorWithFormat:(NSString *)_fmt arguments:(va_list)_va;
+- (void)fatalWithFormat:(NSString *)_fmt arguments:(va_list)_va;
 
 @end
 
diff --git a/sope-core/NGExtensions/NGLogging.subproj/ChangeLog b/sope-core/NGExtensions/NGLogging.subproj/ChangeLog
index 6626a0cc..469c509b 100644
--- a/sope-core/NGExtensions/NGLogging.subproj/ChangeLog
+++ b/sope-core/NGExtensions/NGLogging.subproj/ChangeLog
@@ -1,3 +1,12 @@
+2004-11-18  Marcus Mueller  
+
+	* NGLogLevel.h: new header bearing the log levels
+
+	* NSObject+ExtendedLogging.[hm]: removed. All equivalent functionality
+	  is now in NSObject+Logs.[hm].
+
+	* NGLogger.[hm]: changed API to that required by NSObject+Logs.m.
+
 2004-11-17  Marcus Mueller  
 
 	* *.h: provided some documentation
diff --git a/sope-core/NGExtensions/NGLogging.subproj/GNUmakefile b/sope-core/NGExtensions/NGLogging.subproj/GNUmakefile
index 90d83e25..d90f37a2 100644
--- a/sope-core/NGExtensions/NGLogging.subproj/GNUmakefile
+++ b/sope-core/NGExtensions/NGLogging.subproj/GNUmakefile
@@ -11,7 +11,6 @@ NGLogging_OBJC_FILES += \
 	NGLogEvent.m			\
 	NGLogAppender.m			\
 	NGLogConsoleAppender.m		\
-	NSObject+ExtendedLogging.m	\
 
 # TODO: disable on Windows
 NGLogging_OBJC_FILES += \
diff --git a/sope-core/NGExtensions/NGLogging.subproj/NGLogAppender.m b/sope-core/NGExtensions/NGLogging.subproj/NGLogAppender.m
index 75c41603..09260857 100644
--- a/sope-core/NGExtensions/NGLogging.subproj/NGLogAppender.m
+++ b/sope-core/NGExtensions/NGLogging.subproj/NGLogAppender.m
@@ -20,7 +20,7 @@
 */
 
 #include "NGLogAppender.h"
-#include "NSObject+ExtendedLogging.h"
+#include "NGLogLevel.h"
 #include "NGLogEvent.h"
 #include "common.h"
 
@@ -31,26 +31,29 @@
   [self subclassResponsibility:_cmd];
 #else
   NSLog(@"ERROR(%s): method should be implemented by subclass!",
-	__PRETTY_FUNCTION__);
+          __PRETTY_FUNCTION__);
 #endif
 }
 
 - (NSString *)formattedEvent:(NGLogEvent *)_event {
-  return [NSString stringWithFormat:@"[%@] %@",
-    [self localizedNameOfLogLevel:[_event level]],
-    [_event message]];
+  NSMutableString *fe;
+  NSString        *lvl;
+
+  lvl = [self localizedNameOfLogLevel:[_event level]];
+  fe = [NSMutableString stringWithCapacity:128];
+  if(lvl) {
+    [fe appendString:@"["];
+    [fe appendString:lvl];
+    [fe appendString:@"] "];
+  }
+  [fe appendString:[_event message]];
+  return fe;
 }
 
 - (NSString *)localizedNameOfLogLevel:(NGLogLevel)_level {
   NSString *name;
   
   switch (_level) {
-    case NGLogLevelDebug:
-      name = @"DEBUG";
-      break;
-    case NGLogLevelInfo:
-      name = @"INFO";
-      break;
     case NGLogLevelWarn:
       name = @"WARN";
       break;
@@ -61,7 +64,7 @@
       name = @"FATAL";
       break;
     default:
-      name = @"";
+      name = nil;
       break;
   }
   return name;
diff --git a/sope-core/NGExtensions/NGLogging.subproj/NGLogEvent.m b/sope-core/NGExtensions/NGLogging.subproj/NGLogEvent.m
index fc99bef1..3de406bd 100644
--- a/sope-core/NGExtensions/NGLogging.subproj/NGLogEvent.m
+++ b/sope-core/NGExtensions/NGLogging.subproj/NGLogEvent.m
@@ -24,23 +24,24 @@
 
 @implementation NGLogEvent
 
-static Class DateClass = Nil;
+static Class NSDateClass = Nil;
 
 + (void)initialize {
-  DateClass = [NSDate class];
+  NSDateClass = [NSDate class];
 }
 
 - (id)initWithLevel:(NGLogLevel)_level message:(NSString *)_msg {
-  if((self = [super init])) {
-    self->date  = [DateClass timeIntervalSinceReferenceDate];
-    self->level = _level;
-    self->msg   = [_msg copy];
+  self = [super init];
+  if(self) {
+    self->date    = [NSDateClass timeIntervalSinceReferenceDate];
+    self->level   = _level;
+    self->msg     = [_msg copy];
   }
   return self;
 }
 
 - (void)dealloc {
-  [self->msg release];
+  [self->msg     release];
   [super dealloc];
 }
 
@@ -55,7 +56,7 @@ static Class DateClass = Nil;
 }
 
 - (NSDate *)date {
-  return [DateClass dateWithTimeIntervalSinceReferenceDate:self->date];
+  return [NSDateClass dateWithTimeIntervalSinceReferenceDate:self->date];
 }
 
 @end /* NGLogEvent */
diff --git a/sope-core/NGExtensions/NGLogging.subproj/NGLogger.m b/sope-core/NGExtensions/NGLogging.subproj/NGLogger.m
index d6abd8e0..23105a94 100644
--- a/sope-core/NGExtensions/NGLogging.subproj/NGLogger.m
+++ b/sope-core/NGExtensions/NGLogging.subproj/NGLogger.m
@@ -24,15 +24,20 @@
 #include "NGLogEvent.h"
 #include "NGLogAppender.h"
 
+@interface NGLogger (PrivateAPI)
+- (void)logLevel:(NGLogLevel)_level message:(NSString *)_msg;
+- (void)logLevel:(NGLogLevel)_level withFormat:(NSString *)_fmt, ...;
+@end
+
 @implementation NGLogger
 
 static Class NSStringClass = Nil;
 
 + (void)initialize {
   static BOOL didInit = NO;
-  if(didInit)
+  if (didInit)
     return;
-  didInit = YES;
+  didInit       = YES;
   NSStringClass = [NSString class];
 }
 
@@ -41,18 +46,19 @@ static Class NSStringClass = Nil;
 }
 
 - (id)initWithLogLevel:(NGLogLevel)_level {
-  if ((self = [super init])) {
+  self = [super init];
+  if (self) {
     NSUserDefaults *ud;
-    NSString *appenderClassName;
-    
+    NSString       *appenderClassName;
+
     [self setLogLevel:_level];
     
     // TODO: remove this as soon as we have a config
-    ud = [NSUserDefaults standardUserDefaults];
+    ud                = [NSUserDefaults standardUserDefaults];
     appenderClassName = [ud stringForKey:@"NGLogDefaultAppenderClass"];
     if (appenderClassName == nil)
       appenderClassName = @"NGLogConsoleAppender";
-    self->_appender = [[NSClassFromString(appenderClassName) alloc] init];
+    self->_appender   = [[NSClassFromString(appenderClassName) alloc] init];
   }
   return self;
 }
@@ -73,37 +79,70 @@ static Class NSStringClass = Nil;
 
 /* logging */
 
+- (void)debugWithFormat:(NSString *)_fmt arguments:(va_list)_va {
+  NSString *msg;
+
+  if (self->logLevel < NGLogLevelDebug) return;
+
+  msg = [[NSStringClass alloc] initWithFormat:_fmt arguments:_va];
+  [self logLevel:NGLogLevelDebug message:msg];
+  [msg release];
+}
+
+- (void)logWithFormat:(NSString *)_fmt arguments:(va_list)_va {
+  NSString *msg;
+
+  if (self->logLevel < NGLogLevelInfo) return;
+
+  msg = [[NSStringClass alloc] initWithFormat:_fmt arguments:_va];
+  [self logLevel:NGLogLevelInfo message:msg];
+  [msg release];
+}
+
+- (void)warnWithFormat:(NSString *)_fmt arguments:(va_list)_va {
+  NSString *msg;
+
+  if (self->logLevel < NGLogLevelWarn) return;
+
+  msg = [[NSStringClass alloc] initWithFormat:_fmt arguments:_va];
+  [self logLevel:NGLogLevelWarn message:msg];
+  [msg release];
+}
+
+- (void)errorWithFormat:(NSString *)_fmt arguments:(va_list)_va {
+  NSString *msg;
+
+  if (self->logLevel < NGLogLevelError) return;
+
+  msg = [[NSStringClass alloc] initWithFormat:_fmt arguments:_va];
+  [self logLevel:NGLogLevelError message:msg];
+  [msg release];
+}
+
+- (void)fatalWithFormat:(NSString *)_fmt arguments:(va_list)_va {
+  NSString *msg;
+
+  if (self->logLevel < NGLogLevelFatal) return;
+
+  msg = [[NSStringClass alloc] initWithFormat:_fmt arguments:_va];
+  [self logLevel:NGLogLevelFatal message:msg];
+  [msg release];
+}
+
 - (void)logLevel:(NGLogLevel)_level message:(NSString *)_msg {
   NGLogEvent *event;
 
-  if(self->logLevel < _level)
-    return;
-
   event = [[NGLogEvent alloc] initWithLevel:_level message:_msg];
-  
+
   // iterate appenders
   // TODO: as soon as we have more appenders, we need to iterate on them
   [self->_appender appendLogEvent:event];
   [event release];
 }
 
-- (void)logLevel:(NGLogLevel)_level withFormat:(NSString *)_fmt, ... {
-  NSString *msg;
-  va_list va;
-  
-  if(self->logLevel < _level)
-    return;
-  
-  va_start(va, _fmt);
-  msg = [[NSStringClass alloc] initWithFormat:_fmt arguments:va];
-  va_end(va);
-  [self logLevel:_level message:msg];
-  [msg release];
-}
-
 /* log conditions */
 
-- (BOOL)isLogDebugEnabled {
+- (BOOL)isDebuggingEnabled {
   return self->logLevel >= NGLogLevelDebug;
 }
 - (BOOL)isLogInfoEnabled {
diff --git a/sope-core/NGExtensions/NGLogging.subproj/NGLoggerManager.m b/sope-core/NGExtensions/NGLogging.subproj/NGLoggerManager.m
index 4d442a69..e05f97c7 100644
--- a/sope-core/NGExtensions/NGLogging.subproj/NGLoggerManager.m
+++ b/sope-core/NGExtensions/NGLogging.subproj/NGLoggerManager.m
@@ -20,14 +20,10 @@
 */
 
 #include "NGLoggerManager.h"
-#include "NSObject+ExtendedLogging.h"
+#include "NGLogLevel.h"
 #include "NGLogger.h"
 #include "common.h"
 
-@interface NGLoggerManager (PrivateAPI)
-- (NGLogLevel)_logLevelForString:(NSString *)_defaultValue;
-@end
-
 @implementation NGLoggerManager
 
 static NGLoggerManager *sharedInstance;
@@ -73,18 +69,14 @@ static NSNull          *sharedNull;
   logger = [self->loggerMap objectForKey:_defaultKey];
   if (!logger) {
     NSUserDefaults *ud;
-    NSString       *levelId;
-    NGLogLevel     level;
 
-    ud      = [NSUserDefaults standardUserDefaults];
-    levelId = [[ud stringForKey:_defaultKey] uppercaseString];
-    level   = [self _logLevelForString:levelId];
-    if (level == NGLogLevelOff) {
+    ud = [NSUserDefaults standardUserDefaults];
+    if (![ud boolForKey:_defaultKey]) {
       [self->loggerMap setObject:sharedNull forKey:_defaultKey];
       logger = sharedNull;
     }
     else {
-      logger = [[NGLogger alloc] initWithLogLevel:level];
+      logger = [[NGLogger alloc] initWithLogLevel:NGLogLevelDebug];
       [self->loggerMap setObject:logger forKey:_defaultKey];
       [logger release];
     }
@@ -111,27 +103,4 @@ static NSNull          *sharedNull;
   return [self loggerForFacilityNamed:name];
 }
 
-
-/* Private */
-
-- (NGLogLevel)_logLevelForString:(NSString *)_defaultValue {
-  if ([_defaultValue length] == 0 || [_defaultValue isEqualToString:@"NO"])
-    return NGLogLevelOff;
-  
-  if ([_defaultValue isEqualToString:@"YES"] ||
-     [_defaultValue isEqualToString:@"DEBUG"])
-    return NGLogLevelDebug;
-  
-  if ([_defaultValue isEqualToString:@"INFO"])
-    return NGLogLevelInfo;
-  if ([_defaultValue isEqualToString:@"WARN"])
-    return NGLogLevelWarn;
-  if ([_defaultValue isEqualToString:@"ERROR"])
-    return NGLogLevelError;
-  if ([_defaultValue isEqualToString:@"FATAL"])
-    return NGLogLevelFatal;
-  
-  return NGLogLevelAll;
-}
-
 @end /* NGLoggerManager */
diff --git a/sope-core/NGExtensions/NGLogging.subproj/NSObject+ExtendedLogging.m b/sope-core/NGExtensions/NGLogging.subproj/NSObject+ExtendedLogging.m
deleted file mode 100644
index dba4b6fa..00000000
--- a/sope-core/NGExtensions/NGLogging.subproj/NSObject+ExtendedLogging.m
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
-  Copyright (C) 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.
-*/
-
-#include "NSObject+ExtendedLogging.h"
-#include "NGLogger.h"
-#include "NGLoggerManager.h"
-#include "common.h"
-
-@implementation NSObject(NGExtendedLogging)
-
-+ (id)logger {
-  static id sharedLogger = nil;
-  
-  if (sharedLogger == nil) {
-    NGLoggerManager *lm;
-
-    lm           = [NGLoggerManager defaultLoggerManager];
-    sharedLogger = [lm loggerForDefaultKey:@"NGDefaultLogLevel"];
-    if (!sharedLogger) {
-      sharedLogger = [lm loggerForFacilityNamed:@"root"];
-      [sharedLogger setLogLevel:NGLogLevelInfo];
-    }
-  }
-  return sharedLogger;
-}
-
-- (id)logger {
-  return [[self class] logger];
-}
-
-/* log methods */
-
-- (void)logDebugWithFormat:(NSString *)_fmt, ... {
-  NGLogger *logger;
-  NSString *msg;
-  va_list va;
-  
-  logger = [self logger];
-  if (![logger isLogDebugEnabled])
-    return;
-  
-  va_start(va, _fmt);
-  msg = [[NSString alloc] initWithFormat:_fmt arguments:va];
-  va_end(va);
-  [logger logLevel:NGLogLevelDebug message:msg];
-  [msg release];
-}
-
-- (void)logInfoWithFormat:(NSString *)_fmt, ... {
-  NGLogger *logger;
-  NSString *msg;
-  va_list va;
-  
-  logger = [self logger];
-  if (![logger isLogInfoEnabled])
-    return;
-  
-  va_start(va, _fmt);
-  msg = [[NSString alloc] initWithFormat:_fmt arguments:va];
-  va_end(va);
-  [logger logLevel:NGLogLevelInfo message:msg];
-  [msg release];
-}
-
-- (void)logWarnWithFormat:(NSString *)_fmt, ... {
-  NGLogger *logger;
-  NSString *msg;
-  va_list va;
-  
-  logger = [self logger];
-  if (![logger isLogWarnEnabled])
-    return;
-  
-  va_start(va, _fmt);
-  msg = [[NSString alloc] initWithFormat:_fmt arguments:va];
-  va_end(va);
-  [logger logLevel:NGLogLevelWarn message:msg];
-  [msg release];
-}
-
-- (void)logErrorWithFormat:(NSString *)_fmt, ... {
-  NGLogger *logger;
-  NSString *msg;
-  va_list va;
-  
-  logger = [self logger];
-  if (![logger isLogErrorEnabled])
-    return;
-  
-  va_start(va, _fmt);
-  msg = [[NSString alloc] initWithFormat:_fmt arguments:va];
-  va_end(va);
-  [logger logLevel:NGLogLevelError message:msg];
-  [msg release];
-}
-
-- (void)logFatalWithFormat:(NSString *)_fmt, ... {
-  NGLogger *logger;
-  NSString *msg;
-  va_list va;
-
-  logger = [self logger];
-  if (![logger isLogFatalEnabled])
-    return;
-
-  va_start(va, _fmt);
-  msg = [[NSString alloc] initWithFormat:_fmt arguments:va];
-  va_end(va);
-  [logger logLevel:NGLogLevelFatal message:msg];
-  [msg release];
-}
-
-- (void)logLevel:(NGLogLevel)_level message:(NSString *)_msg {
-  [[self logger] logLevel:_level message:_msg];
-}
-
-- (void)logLevel:(NGLogLevel)_level withFormat:(NSString *)_fmt, ... {
-  NSString *msg;
-  va_list va;
-  
-  va_start(va, _fmt);
-  msg = [[NSString alloc] initWithFormat:_fmt arguments:va];
-  va_end(va);
-  [[self logger] logLevel:_level withFormat:msg];
-  [msg release];
-}
-
-/* log conditions (do not use, slow ...) */
-
-- (BOOL)isLogDebugEnabled {
-  return [[self logger] isLogDebugEnabled];
-}
-
-- (BOOL)isLogInfoEnabled {
-  return [[self logger] isLogInfoEnabled];
-}
-
-- (BOOL)isLogWarnEnabled {
-  return [[self logger] isLogWarnEnabled];
-}
-
-- (BOOL)isLogErrorEnabled {
-  return [[self logger] isLogErrorEnabled];
-}
-
-- (BOOL)isLogFatalEnabled {
-  return [[self logger] isLogFatalEnabled];
-}
-
-@end /* NSObject(NGExtendedLogging) */
diff --git a/sope-core/NGExtensions/Version b/sope-core/NGExtensions/Version
index a03e8d98..93b5fd83 100644
--- a/sope-core/NGExtensions/Version
+++ b/sope-core/NGExtensions/Version
@@ -1,6 +1,6 @@
 # version
 
-SUBMINOR_VERSION:=133
+SUBMINOR_VERSION:=134
 
 # v4.3.115 requires libFoundation v1.0.59
 # v4.2.72  requires libEOControl  v4.2.39