diff --git a/API.markdown b/API.markdown index e21b1f0..ecee9f3 100644 --- a/API.markdown +++ b/API.markdown @@ -18,7 +18,7 @@ Most of the API that you need for using g3log is described in this readme. For m * Support for [dynamic message sizing](#dynamic_message_sizing) * Fatal handling * [Linux/*nix](#fatal_handling_linux) - * [TOWRITE: Custom fatal handling](#fatal_custom_handling) + * [Custom fatal handling](#fatal_custom_handling) * [TOWRITE: Pre fatal hook](#fatal_pre_hook) * [TOWRITE: Override of signal handling](#fatal_signalhandler_override) * [Disable fatal handling](#fatal_handling_disabled) @@ -299,7 +299,24 @@ The default behaviour for G3log is to catch several fatal events before they for ``` - ### TOWRITE: Custom fatal handling + ### TOWRITE: Custom fatal handling + By default the fatal signals are defined in [src/g3log.cpp](src/g3log.cpp) as + ``` + SIGABRT + SIGFPE + SIGILL + SIGSEGV + SIGTERM + ``` + If you want to define your own set of fatal signals, override the default ones, then this can be done as shown in [src/g3log/crashhandler.hpp](src/g3log/crashhandler.hpp) + ``` + // Example when SIGTERM is skipped due to ZMQ usage + g3::overrideSetupSignals({ {SIGABRT, "SIGABRT"}, + {SIGFPE, "SIGFPE"}, + {SIGILL, "SIGILL"}, + {SIGSEGV, "SIGSEGV"}}); + ``` + ### TOWRITE: Pre fatal hook ### TOWRITE: Override of signal handling ### Disable fatal handling