This repository has been archived on 2026-01-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
logging/tests/test-log-file.c
2025-11-03 16:39:27 +08:00

16 lines
481 B
C

#include "logging.h"
#include "logging/logging-handler.h"
int main() {
log_Handler *hander = loggingHandlerFile("test_log", 1024 * 1024 * 10);
loggingAddHandler(loggingGetDefaultLogger(), hander);
Log_info("This is an info message");
Log_error("This is an error message%s", "123");
Log_fatal("This is an fatal message");
Log_debug("This is a debug message");
Log_warning("This is a warning message%s", "123");
loggingDestroyAll();
return 0;
}