quill
Public Attributes | List of all members
SignalHandlerOptions Struct Reference

Struct to hold options for the signal handler. More...

#include <SignalHandler.h>

Public Attributes

std::vector< int > catchable_signals {SIGTERM, SIGINT, SIGABRT, SIGFPE, SIGILL, SIGSEGV}
 List of signals that the backend should catch if with_signal_handler is enabled.
 
uint32_t timeout_seconds = 20u
 Defines the timeout duration in seconds for the signal handler alarm. More...
 
std::string logger
 The logger instance that the signal handler will use to log errors when the application crashes. More...
 

Detailed Description

Struct to hold options for the signal handler.

Member Data Documentation

◆ logger

std::string SignalHandlerOptions::logger

The logger instance that the signal handler will use to log errors when the application crashes.

The logger is accessed by the signal handler and must be created by your application using Frontend::create_or_get_logger(...). If the specified logger is not found, or if this parameter is left empty, the signal handler will default to using the first valid logger it finds.

◆ timeout_seconds

uint32_t SignalHandlerOptions::timeout_seconds = 20u

Defines the timeout duration in seconds for the signal handler alarm.

It is only available on Linux, as Windows does not support the alarm function. The signal handler sets up an alarm to ensure that the process will terminate if it does not complete within the specified time frame. This is particularly useful to prevent the process from hanging indefinitely in case the signal handler encounters an issue.


The documentation for this struct was generated from the following file: