rename log_level_check() to log_check_level()
This commit is contained in:
@@ -2,33 +2,36 @@
|
||||
#include <stddef.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "stellar/log.h"
|
||||
#include "stellar/stellar.h"
|
||||
#include "stellar_core.h"
|
||||
|
||||
struct stellar *st = NULL;
|
||||
static void signal_handler(int signo)
|
||||
{
|
||||
struct logger *logger = stellar_get_logger(st);
|
||||
|
||||
if (signo == SIGINT)
|
||||
{
|
||||
printf("SIGINT received, notify threads to exit\n");
|
||||
STELLAR_LOG_FATAL(logger, "signal", "SIGINT received, notify threads to exit");
|
||||
stellar_loopbreak(st);
|
||||
}
|
||||
|
||||
if (signo == SIGQUIT)
|
||||
{
|
||||
printf("SIGQUIT received, notify threads to exit\n");
|
||||
STELLAR_LOG_FATAL(logger, "signal", "SIGQUIT received, notify threads to exit");
|
||||
stellar_loopbreak(st);
|
||||
}
|
||||
|
||||
if (signo == SIGTERM)
|
||||
{
|
||||
printf("SIGTERM received, notify threads to exit\n");
|
||||
STELLAR_LOG_FATAL(logger, "signal", "SIGTERM received, notify threads to exit");
|
||||
stellar_loopbreak(st);
|
||||
}
|
||||
|
||||
if (signo == SIGHUP)
|
||||
{
|
||||
printf("SIGHUP received, reload log level\n");
|
||||
STELLAR_LOG_FATAL(logger, "signal", "SIGHUP received, reload log level");
|
||||
stellar_reload_log_level(st);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user