Subversion Repositories Mokou

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 4
Line 1... Line 1...
1
/* $Id: log.c 2 2024-09-05 18:31:51Z nishi $ */
1
/* $Id: log.c 4 2024-09-06 09:55:53Z nishi $ */
2
 
2
 
3
#include "mk_log.h"
3
#include "mk_log.h"
4
 
4
 
5
#include <syslog.h>
5
#include <syslog.h>
-
 
6
#include <stdio.h>
-
 
7
#include <stdbool.h>
-
 
8
 
-
 
9
bool mk_syslog = true;
6
 
10
 
7
void mk_log(const char* log){
11
void mk_log(const char* log){
-
 
12
	if(mk_syslog){
8
	syslog(LOG_INFO, log);
13
		syslog(LOG_INFO, log);
-
 
14
	}else{
-
 
15
		fprintf(stderr, "%s\n", log);
-
 
16
	}
9
}
17
}