Home » U++ Library support » U++ Core » LOG compression
LOG compression [message #39186] |
Mon, 25 February 2013 11:03 |
Zbych
Messages: 325 Registered: July 2009
|
Senior Member |
|
|
Hi,
LOG keeps creating compressed logs regardless of LOG_ROTATE_GZIP flag. There should be additional LOG_ROTATE_GZIP flag check in Create function.
void LogOut::Create(bool append)
{
Close();
char next[512];
for(int rot = options >> 24; rot >= 0; rot--) {
char current[512];
if(rot == 0)
strcpy(current, filepath);
else
sprintf(current, rot > 1 && (options & LOG_ROTATE_GZIP) ? "%s.%d.gzip" : "%s.%d",
filepath, rot);
if(FileExists(current)) {
if(rot == (options >> 24))
FileDelete(current);
else
if((options & LOG_ROTATE_GZIP) && rot == 1 && !IsPanicMode()) //<<<---- "(options & LOG_ROTATE_GZIP) &&" is missing
SaveFile(next, GZCompress(LoadFile(current)));
else
FileMove(current, next);
}
strcpy(next, current);
}
|
|
|
|
Goto Forum:
Current Time: Thu Apr 25 13:59:46 CEST 2024
Total time taken to generate the page: 0.02376 seconds
|