git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed logging to support 8-charater identifiers
[tpg/acess2.git]
/
Kernel
/
logging.c
diff --git
a/Kernel/logging.c
b/Kernel/logging.c
index
ad63a21
..
18f75fb
100644
(file)
--- a/
Kernel/logging.c
+++ b/
Kernel/logging.c
@@
-29,9
+29,9
@@
typedef struct sLogEntry
struct sLogEntry *Next;
struct sLogEntry *LevelNext;
Sint64 Time;
struct sLogEntry *Next;
struct sLogEntry *LevelNext;
Sint64 Time;
- char Ident[8];
int Level;
int Length;
int Level;
int Length;
+ char Ident[9];
char Data[];
} tLogEntry;
typedef struct sLogList
char Data[];
} tLogEntry;
typedef struct sLogList
@@
-79,17
+79,17
@@
void Log_AddEvent(char *Ident, int Level, char *Format, va_list Args)
len = vsnprintf(NULL, 256, Format, Args);
len = vsnprintf(NULL, 256, Format, Args);
- Log("len = %i", len);
+
//
Log("len = %i", len);
ent = malloc(sizeof(tLogEntry)+len+1);
ent->Time = now();
ent = malloc(sizeof(tLogEntry)+len+1);
ent->Time = now();
- strncpy(ent->Ident, Ident,
7
);
+ strncpy(ent->Ident, Ident,
8
);
ent->Level = Level;
ent->Length = len;
vsnprintf( ent->Data, 256, Format, Args );
ent->Level = Level;
ent->Length = len;
vsnprintf( ent->Data, 256, Format, Args );
- Log("ent->Ident = '%s'", ent->Ident);
- Log("ent->Data = '%s'", ent->Data);
+
//
Log("ent->Ident = '%s'", ent->Ident);
+
//
Log("ent->Data = '%s'", ent->Data);
LOCK( &glLog );
LOCK( &glLog );
@@
-118,7
+118,7
@@
void Log_AddEvent(char *Ident, int Level, char *Format, va_list Args)
*/
void Log_Int_PrintMessage(tLogEntry *Entry)
{
*/
void Log_Int_PrintMessage(tLogEntry *Entry)
{
- LogF("%018
i% [%
8s] %s\n",
+ LogF("%018
lli%s [%+
8s] %s\n",
Entry->Time,
csaLevelCodes[Entry->Level],
Entry->Ident,
Entry->Time,
csaLevelCodes[Entry->Level],
Entry->Ident,
UCC
git Repository :: git.ucc.asn.au