First commit
This commit is contained in:
commit
0a28bac78a
37 changed files with 1963 additions and 0 deletions
21
logger.c
Normal file
21
logger.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include "logger.h"
|
||||
|
||||
void log_open(const char *name) {
|
||||
openlog(name, LOG_CONS | LOG_PID, LOG_LOCAL3);
|
||||
}
|
||||
|
||||
void log_close() {
|
||||
closelog();
|
||||
}
|
||||
|
||||
void log_inform(const char *msg) {
|
||||
syslog(LOG_NOTICE, "%s", msg);
|
||||
}
|
||||
|
||||
void log_warn(const char *msg) {
|
||||
syslog(LOG_WARNING, "[WARNING] %s", msg);
|
||||
}
|
||||
|
||||
void log_exclaim(const char *msg) {
|
||||
syslog(LOG_ERR, "[ERROR] %s", msg);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue