mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-21 02:41:11 +00:00
debug archiving fix
This commit is contained in:
parent
6d096a9eca
commit
76a091d78e
2 changed files with 21 additions and 6 deletions
|
@ -1,3 +1,7 @@
|
|||
2017-09-18 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* EcProcess.m: Fix for repeated log archiving on startup.
|
||||
|
||||
2017-08-09 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* EcProcess.m(ecNewDay:):
|
||||
|
|
23
EcProcess.m
23
EcProcess.m
|
@ -2340,14 +2340,25 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
|||
|
||||
- (void) ecNewDay: (NSCalendarDate*)when
|
||||
{
|
||||
static BOOL beenHere = NO;
|
||||
static NSDictionary *defs = nil;
|
||||
NSDictionary *d = [cmdDefs volatileDomainForName: @"EcCommand"];
|
||||
|
||||
/* Archive previous day's logs. Force logs to be archived for the
|
||||
* specified date even if they have been modified today (on the basis
|
||||
* that only the very latest info in them should be from today).
|
||||
*/
|
||||
NSLog(@"%@", [self ecArchive: when]);
|
||||
if (YES == beenHere)
|
||||
{
|
||||
/* Archive previous day's logs. Force logs to be archived for the
|
||||
* specified date even if they have been modified today (on the basis
|
||||
* that only the very latest info in them should be from today).
|
||||
*/
|
||||
NSLog(@"Daily: %@", [self ecArchive: when]);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* First time round we must not archive since that will have
|
||||
* been done on startup anyway.
|
||||
*/
|
||||
beenHere = NO;
|
||||
}
|
||||
|
||||
if (nil != defs)
|
||||
{
|
||||
|
@ -4366,7 +4377,7 @@ With two parameters ('maximum' and a number),\n\
|
|||
/*
|
||||
* Force archiving of old logfile.
|
||||
*/
|
||||
[self ecArchive: nil];
|
||||
NSLog(@"Startup: %@", [self ecArchive: nil]);
|
||||
|
||||
ASSIGNCOPY(cmdDebugName, str);
|
||||
hdl = [self cmdLogFile: cmdDebugName];
|
||||
|
|
Loading…
Reference in a new issue