chiark / gitweb /
sd-dhcp: make sure client->secs > 0
[elogind.git] / src / shared / log.h
index ac20a985c5eec1248337de09ef21dcc68819e61a..6a0f6735c5a2e6f0151af764d5f8a65937d45ed1 100644 (file)
   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"
@@ -124,13 +125,19 @@ int log_dump_internal(
                 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,
@@ -139,7 +146,7 @@ _noreturn_ void log_assert_failed_unreachable(
 #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__)
@@ -161,3 +168,5 @@ const char *log_target_to_string(LogTarget target) _const_;
 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);