Author: rfm
Date: Fri May 16 18:39:05 2014
New Revision: 37888

URL: http://svn.gna.org/viewcvs/gnustep?rev=37888&view=rev
Log:
minor logging tweaks

Modified:
    libs/ec/trunk/ChangeLog
    libs/ec/trunk/EcCommand.m
    libs/ec/trunk/EcLogger.h
    libs/ec/trunk/EcLogger.m
    libs/ec/trunk/EcProcess.m
    libs/ec/trunk/GNUmakefile

Modified: libs/ec/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/ChangeLog?rev=37888&r1=37887&r2=37888&view=diff
==============================================================================
--- libs/ec/trunk/ChangeLog     (original)
+++ libs/ec/trunk/ChangeLog     Fri May 16 18:39:05 2014
@@ -1,8 +1,13 @@
 2014-05-16  Richard Frith-Macdonald <[email protected]>
 
-       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 <[email protected]>
 

Modified: libs/ec/trunk/EcCommand.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcCommand.m?rev=37888&r1=37887&r2=37888&view=diff
==============================================================================
--- libs/ec/trunk/EcCommand.m   (original)
+++ libs/ec/trunk/EcCommand.m   Fri May 16 18:39:05 2014
@@ -579,13 +579,39 @@
     {
       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 @@
        }
       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];

Modified: libs/ec/trunk/EcLogger.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcLogger.h?rev=37888&r1=37887&r2=37888&view=diff
==============================================================================
--- libs/ec/trunk/EcLogger.h    (original)
+++ libs/ec/trunk/EcLogger.h    Fri May 16 18:39:05 2014
@@ -35,7 +35,7 @@
   NSRecursiveLock       *lock;
   NSDate               *last;
   NSTimer              *timer;
-  unsigned             interval;
+  NSTimeInterval       interval;
   unsigned             size;
   NSMutableString      *message;
   EcLogType            type;

Modified: libs/ec/trunk/EcLogger.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcLogger.m?rev=37888&r1=37887&r2=37888&view=diff
==============================================================================
--- libs/ec/trunk/EcLogger.m    (original)
+++ libs/ec/trunk/EcLogger.m    Fri May 16 18:39:05 2014
@@ -79,7 +79,7 @@
        = [[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 @@
        }
     }
       
-  /*
-   *   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)
     {

Modified: libs/ec/trunk/EcProcess.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcProcess.m?rev=37888&r1=37887&r2=37888&view=diff
==============================================================================
--- libs/ec/trunk/EcProcess.m   (original)
+++ libs/ec/trunk/EcProcess.m   Fri May 16 18:39:05 2014
@@ -2346,6 +2346,7 @@
   [self _connectionRegistered];
 
   [self cmdAudit: @"Started `%@'", [self cmdName]];
+  [self cmdFlushLogs];
   
   loop = [NSRunLoop currentRunLoop];
   while (YES == [EcProcConnection isValid])

Modified: libs/ec/trunk/GNUmakefile
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/GNUmakefile?rev=37888&r1=37887&r2=37888&view=diff
==============================================================================
--- libs/ec/trunk/GNUmakefile   (original)
+++ libs/ec/trunk/GNUmakefile   Fri May 16 18:39:05 2014
@@ -25,7 +25,7 @@
 -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


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to