common: create logprint_silent to replace qbsp's msgFile
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
b1650d0036
commit
75666712e7
11
common/log.c
11
common/log.c
|
|
@ -80,6 +80,17 @@ logprint_locked__(const char *fmt, ...)
|
||||||
va_end(args);
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void logprint_silent(const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
ThreadLock();
|
||||||
|
va_start(args, fmt);
|
||||||
|
vfprintf(logfile, fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
ThreadUnlock();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
logprint(const char *fmt, ...)
|
logprint(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,16 @@
|
||||||
|
|
||||||
void init_log(const char *filename);
|
void init_log(const char *filename);
|
||||||
void close_log();
|
void close_log();
|
||||||
void logprint(const char *fmt, ...) __attribute__((format(printf,1,2)));
|
|
||||||
void logvprint(const char *fmt, va_list args) __attribute__((format(printf,1,0)));
|
/* Print to screen and to log file */
|
||||||
|
void logprint(const char *fmt, ...)
|
||||||
|
__attribute__((format(printf,1,2)));
|
||||||
|
void logvprint(const char *fmt, va_list args)
|
||||||
|
__attribute__((format(printf,1,0)));
|
||||||
|
|
||||||
|
/* Print only into log file */
|
||||||
|
void logprint_silent(const char *fmt, ...)
|
||||||
|
__attribute__((format(printf,1,2)));
|
||||||
|
|
||||||
/* Only called from the threads code */
|
/* Only called from the threads code */
|
||||||
void logprint_locked__(const char *fmt, ...)
|
void logprint_locked__(const char *fmt, ...)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue