minor tweaks to logging improvements

r3759 | dcl | 2012-10-05 17:00:32 +1000 (Fri, 05 Oct 2012) | 1 line
This commit is contained in:
Douglas Clowes
2012-10-05 17:00:32 +10:00
parent 16d8498fab
commit 5dcc460e78
2 changed files with 22 additions and 21 deletions

View File

@@ -414,8 +414,6 @@ snprintf(fPath, 1023, "%s/", "../log");
buf[idx++] = '\0';
SICSLogWriteFile(buf, eOut, tp);
idx = 0;
++cp;
continue;
}
else if (*cp == '\r') {
buf[idx++] = '\\';
@@ -431,21 +429,20 @@ snprintf(fPath, 1023, "%s/", "../log");
buf[idx++] = hex[(*cp >> 4) & 0xF];
buf[idx++] = hex[(*cp) & 0xF];
buf[idx++] = '>';
} else {
}
else {
buf[idx++] = *cp;
}
cp++;
if (idx > 132) {
if (buf[idx - 1] != '\n')
buf[idx++] = '\n';
buf[idx++] = '\n';
buf[idx++] = '\0';
SICSLogWriteFile(buf, eOut, tp);
idx = 0;
}
}
if (idx > 0) {
if (buf[idx - 1] != '\n')
buf[idx++] = '\n';
buf[idx++] = '\n';
buf[idx++] = '\0';
SICSLogWriteFile(buf, eOut, tp);
}