2 * Sherlock Library -- Logging
4 * (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
15 static byte *progname = "???";
19 logit(int level, byte *msg, va_list args)
27 strftime(buf, sizeof(buf), "%d-%m-%y %H-%M-%S", tm);
28 fprintf(stderr, "%s %s [%d] <%d> ", buf, progname, pid, level);
29 vfprintf(stderr, msg, args);
41 if (msg[0] == '<' && msg[1] >= '0' && msg[1] <= '9' && msg[2] == '>')
46 logit(level, msg, args);
75 progname = basename(argv0);