Commit 243ae119 authored by Ulrich Huber's avatar Ulrich Huber Committed by Oliver Horst
Browse files

[add] PTPd syslog macros

parent 4b603735
#ifndef TOKI_SYSLOG_PTPD_H_IN
#define TOKI_SYSLOG_PTPD_H_IN
#include "../syslog.h"
#include <toki/syslog/configs/components/ptpd.h>
#if TOKI_SYSLOG_COMPONENT_PTPD_ENABLED && defined(TOKI_SYSLOG_COMPONENT_PTPD_LEVEL)
#if TOKI_SYSLOG_COMPONENT_PTPD_LEVEL <= 7
# define ptpd_log_emergency(format, ...) toki_log_emergency(TOKI_SYSLOG_COMPONENT_PTPD_FACILITY, format, ##__VA_ARGS__)
#else
# define ptpd_log_emergency(...)
#endif
#if TOKI_SYSLOG_COMPONENT_PTPD_LEVEL <= 6
# define ptpd_log_alert(format, ...) toki_log_alert(TOKI_SYSLOG_COMPONENT_PTPD_FACILITY, format, ##__VA_ARGS__)
#else
# define ptpd_log_alert(...)
#endif
#if TOKI_SYSLOG_COMPONENT_PTPD_LEVEL <= 5
# define ptpd_log_critical(format, ...) toki_log_critical(TOKI_SYSLOG_COMPONENT_PTPD_FACILITY, format, ##__VA_ARGS__)
#else
# define ptpd_log_critical(...)
#endif
#if TOKI_SYSLOG_COMPONENT_PTPD_LEVEL <= 4
# define ptpd_log_error(format, ...) toki_log_error(TOKI_SYSLOG_COMPONENT_PTPD_FACILITY, format, ##__VA_ARGS__)
#else
# define ptpd_log_error(...)
#endif
#if TOKI_SYSLOG_COMPONENT_PTPD_LEVEL <= 3
# define ptpd_log_warning(format, ...) toki_log_warning(TOKI_SYSLOG_COMPONENT_PTPD_FACILITY, format, ##__VA_ARGS__)
#else
# define ptpd_log_warning(...)
#endif
#if TOKI_SYSLOG_COMPONENT_PTPD_LEVEL <= 2
# define ptpd_log_notice(format, ...) toki_log_notice(TOKI_SYSLOG_COMPONENT_PTPD_FACILITY, format, ##__VA_ARGS__)
#else
# define ptpd_log_notice(...)
#endif
#if TOKI_SYSLOG_COMPONENT_PTPD_LEVEL <= 1
# define ptpd_log_info(format, ...) toki_log_info(TOKI_SYSLOG_COMPONENT_PTPD_FACILITY, format, ##__VA_ARGS__)
#else
# define ptpd_log_info(...)
#endif
#if TOKI_SYSLOG_COMPONENT_PTPD_LEVEL == 0
# define ptpd_log_debug(format, ...) toki_log_debug(TOKI_SYSLOG_COMPONENT_PTPD_FACILITY, format, ##__VA_ARGS__)
#else
# define ptpd_log_debug(...)
#endif
#else
#define ptpd_log_emergency(...)
#define ptpd_log_alert(...)
#define ptpd_log_critical(...)
#define ptpd_log_error(...)
#define ptpd_log_warning(...)
#define ptpd_log_notice(...)
#define ptpd_log_info(...)
#define ptpd_log_debug(...)
#endif
#endif
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment