along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <syslog.h>
#include <stdbool.h>
#include <stdarg.h>
+#include <syslog.h>
+#include <sys/signalfd.h>
#include <errno.h>
#include "macro.h"
int log_set_max_level_from_string(const char *e);
void log_show_color(bool b);
+bool log_get_show_color(void) _pure_;
void log_show_location(bool b);
+bool log_get_show_location(void) _pure_;
int log_show_color_from_string(const char *e);
int log_show_location_from_string(const char *e);
const char *func,
char *buffer);
-_noreturn_ void log_assert_failed(
+noreturn void log_assert_failed(
+ const char *text,
+ const char *file,
+ int line,
+ const char *func);
+
+noreturn void log_assert_failed_unreachable(
const char *text,
const char *file,
int line,
const char *func);
-_noreturn_ void log_assert_failed_unreachable(
+void log_assert_failed_return(
const char *text,
const char *file,
int line,
#define log_full(level, ...) \
do { \
if (log_get_max_level() >= (level)) \
- log_meta(LOG_INFO, __FILE__, __LINE__, __func__, __VA_ARGS__); \
+ log_meta((level), __FILE__, __LINE__, __func__, __VA_ARGS__); \
} while (0)
#define log_debug(...) log_full(LOG_DEBUG, __VA_ARGS__)
LogTarget log_target_from_string(const char *s) _pure_;
#define MESSAGE_ID(x) "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(x)
+
+void log_received_signal(int level, const struct signalfd_siginfo *si);