Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
archived/test/t_log.c
2010-12-22 14:51:26 +01:00

28 lines
609 B
C

#include <errno.h>
#include <stddef.h>
#include "../src/log.h"
int main() {
init_log(LOG_INFO | LOG_WARN, NULL);
logmsg(LOG_INFO, "this is stderr");
logmsg(LOG_CRIT, "Should not show");
logerrno(LOG_CRIT, NULL, ENOENT);
init_log(LOG_INFO | LOG_WARN | LOG_CRIT, "./logs/");
logmsg(LOG_INFO, "some info");
logmsg(LOG_WARN, "invalid type '%i'", 3);
logerrno(LOG_CRIT, "malloc", ENOMEM);
logerrno(LOG_CRIT, NULL, ENOENT);
logmsg(LOG_DEBUG, "Should not show");
logmsg(LOG_INFO | LOG_CRIT, "Should not work, can only log to one priority");
return 0;
}