mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 11:40:27 +03:00
Improved server debug functions.
This commit is contained in:
parent
91adc48178
commit
b1a1717fd9
10
snac.c
10
snac.c
@ -39,13 +39,15 @@ d_char *xs_time(char *fmt, int local)
|
||||
}
|
||||
|
||||
|
||||
void srv_log(d_char *str)
|
||||
/* logs a message */
|
||||
void srv_debug(int level, d_char *str)
|
||||
/* logs a debug message */
|
||||
{
|
||||
xs *tm = xs_local_time("%H:%M:%S");
|
||||
xs *msg = str;
|
||||
|
||||
fprintf(stderr, "%s %s\n", tm, msg);
|
||||
if (dbglevel >= level) {
|
||||
xs *tm = xs_local_time("%H:%M:%S");
|
||||
fprintf(stderr, "%s %s\n", tm, msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user