31 static struct mlog log;
43 if (log.
head >= 0x7fffffff)
76 static struct mlog_line *get_line(
unsigned int n)
92 for (
int i=0; (line = get_line(i)); i++)
93 fprintf(f, line->
fmt, line->
arg[0], line->
arg[1], line->
arg[2]);
void mlog_nice(const char *fmt,...)
Log a message, if there is space to do so.
struct mlog_line line[256]
void mlog_dump(FILE *f)
Format the log and write it to the supplied file pointer.
void vmlog(const char *fmt, va_list ap)
Log a message using a variable argument list.
char * mlog_get_line(int n)
Format the Nth line of the log.
void mlog_clear(void)
Clear all data from the log.
void mlog(const char *fmt,...)
Log a message.
void vmlog_nice(const char *fmt, va_list ap)
Log a message using a variable argument list, if there is space to do so.
char * strdup_printf(const char *format,...)