minor logging tweaks

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@37888 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2014-05-16 16:39:05 +00:00
parent c4dc8d4489
commit 3f204d7a83
6 changed files with 40 additions and 30 deletions

View file

@ -1,8 +1,13 @@
2014-05-16 Richard Frith-Macdonald <rfm@gnu.org>
EcAlarmDestination.m: Perform all connection operations in
* EcAlarmDestination.m: Perform all connection operations in
main thread (forwarding etc) and ensure that we run the
current run loop while waiting for startup and shutdown.
* EcLogger.m: Use floating point flush interval for modern
systems which run faster and might want to flush more than
once per second.
* GNUmakefile: bump subminor version number for release
Version 1.1.3 release
2014-05-14 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -579,13 +579,39 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
{
EcClientI *r;
/*
* See if we have a fitting client - and update records.
/* See if we have a fitting client - and update records.
*/
r = [self findIn: clients byObject: (id)from];
if (r != nil)
{
NSString *n = [r name];
[r gnip: num];
/* After the first ping response from a client we assume
* that client has completed startup and is running OK.
* We can therefore clear any loss of client alarm.
*/
if (nil != [alarmed member: n])
{
NSString *managedObject;
EcAlarm *a;
[alarmed removeObject: n];
managedObject = EcMakeManagedObject(host, n, nil);
a = [EcAlarm alarmForManagedObject: managedObject
at: nil
withEventType: EcAlarmEventTypeProcessingError
probableCause: EcAlarmSoftwareProgramAbnormallyTerminated
specificProblem: @"Process availability"
perceivedSeverity: EcAlarmSeverityCleared
proposedRepairAction: nil
additionalText: nil];
[self alarm: a];
[self clearConfigurationFor: managedObject
specificProblem: @"Process launch"
additionalText: @"Process is now running"];
}
}
}
}
@ -2020,24 +2046,7 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
}
else
{
NSString *managedObject;
EcAlarm *a;
[obj setTransient: NO];
[alarmed removeObject: n];
managedObject = EcMakeManagedObject(host, n, nil);
a = [EcAlarm alarmForManagedObject: managedObject
at: nil
withEventType: EcAlarmEventTypeProcessingError
probableCause: EcAlarmSoftwareProgramAbnormallyTerminated
specificProblem: @"Process availability"
perceivedSeverity: EcAlarmSeverityCleared
proposedRepairAction: nil
additionalText: nil];
[self alarm: a];
[self clearConfigurationFor: managedObject
specificProblem: @"Process launch"
additionalText: @"Process is now running"];
[self information: m from: nil to: nil type: LT_AUDIT];
}
[self update];

View file

@ -35,7 +35,7 @@
NSRecursiveLock *lock;
NSDate *last;
NSTimer *timer;
unsigned interval;
NSTimeInterval interval;
unsigned size;
NSMutableString *message;
EcLogType type;

View file

@ -79,7 +79,7 @@ static NSArray *modes;
= [[NSString alloc] initWithFormat: @"BS%@Flush", logger->key];
logger->serverKey
= [[NSString alloc] initWithFormat: @"BS%@Server", logger->key];
logger->interval = 1.0;
logger->interval = 10.0;
logger->size = 8 * 1024;
logger->message = [[NSMutableString alloc] initWithCapacity: 2048];
@ -524,18 +524,13 @@ static NSArray *modes;
}
}
/*
* Is the program to flush at intervals or at
* a particular buffer size (or both)?
/* Is the program to flush at intervals or at
* a particular buffer size (or both)?
*/
str = [defs stringForKey: flushKey];
if (str == nil)
{
str = [defs stringForKey: @"BSDefaultFlush"]; // Default settings.
if (str == nil)
{
str = [defs stringForKey: @"BSDebugFlush"]; // Backward compat.
}
}
if (str != nil)
{

View file

@ -2346,6 +2346,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
[self _connectionRegistered];
[self cmdAudit: @"Started `%@'", [self cmdName]];
[self cmdFlushLogs];
loop = [NSRunLoop currentRunLoop];
while (YES == [EcProcConnection isValid])

View file

@ -25,7 +25,7 @@ include $(GNUSTEP_MAKEFILES)/common.make
-include ../local.make
PACKAGE_NAME=EnterpriseControlConfigurationLogging
PACKAGE_VERSION=1.1.2
PACKAGE_VERSION=1.1.3
Ec_INTERFACE_VERSION=1.1
SVN_BASE_URL=svn+ssh://svn.gna.org/svn/gnustep/libs