gemstone/tests/logging/panic.c

24 lines
412 B
C
Raw Permalink Normal View History

2024-05-02 07:49:14 +00:00
//
// Created by servostar on 5/2/24.
//
#include "sys/log.h"
2024-06-02 22:24:17 +00:00
#include <cfg/opt.h>
2024-05-02 07:49:14 +00:00
2024-06-02 22:24:17 +00:00
int main(int argc, char* argv[]) {
parse_options(argc, argv);
2024-05-02 07:49:14 +00:00
log_init();
2024-06-02 22:24:17 +00:00
set_log_level(LOG_LEVEL_DEBUG);
2024-05-02 07:49:14 +00:00
// this should appear in stderr
INFO("before exit");
PANIC("oooops something happened");
// this should NOT appear in stderr
// ^^^
ERROR("after exit");
return 0;
}