Skip to content
Snippets Groups Projects
Commit 1c5cf0f9 authored by rswindell's avatar rswindell
Browse files

Include the current system time in log messages (so they contain the time of

event rather than the time of their were actually logged, which could be later)
parent 5be4b399
No related branches found
No related tags found
No related merge requests found
...@@ -294,6 +294,7 @@ static int svc_lputs(void* p, int level, const char* str) ...@@ -294,6 +294,7 @@ static int svc_lputs(void* p, int level, const char* str)
len = strlen(str); len = strlen(str);
SAFECOPY(msg.buf, str); SAFECOPY(msg.buf, str);
msg.level = level; msg.level = level;
GetLocalTime(&msg.time);
/* Mailslot Logging (for sbbsctrl) */ /* Mailslot Logging (for sbbsctrl) */
if(svc->log_handle != INVALID_HANDLE_VALUE /* Invalid log handle? */ if(svc->log_handle != INVALID_HANDLE_VALUE /* Invalid log handle? */
......
...@@ -55,8 +55,9 @@ enum { ...@@ -55,8 +55,9 @@ enum {
}; };
typedef struct { typedef struct {
char level; SYSTEMTIME time;
char buf[1024]; char level;
char buf[1000];
} log_msg_t; } log_msg_t;
#endif /* Don't add anything after this line */ #endif /* Don't add anything after this line */
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment