mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
25 lines
345 B
C
25 lines
345 B
C
|
// Simple logging functions for the RFS server
|
||
|
|
||
|
#include "log.h"
|
||
|
#include <stdio.h>
|
||
|
#include <stdarg.h>
|
||
|
|
||
|
static int log_level;
|
||
|
|
||
|
void log_init( int level )
|
||
|
{
|
||
|
log_level = level;
|
||
|
}
|
||
|
|
||
|
void log_msg( const char *msg, ... )
|
||
|
{
|
||
|
va_list va;
|
||
|
|
||
|
if( log_level == LOG_ALL )
|
||
|
{
|
||
|
va_start( va, msg );
|
||
|
vprintf( msg, va );
|
||
|
va_end( va );
|
||
|
}
|
||
|
}
|