1 // SPDX-License-Identifier: CDDL-1.0 2 /* 3 * This file and its contents are supplied under the terms of the 4 * Common Development and Distribution License ("CDDL"), version 1.0. 5 * You may only use this file in accordance with the terms of version 6 * 1.0 of the CDDL. 7 * 8 * A full copy of the text of the CDDL should have accompanied this 9 * source. A copy of the CDDL is also available via the Internet at 10 * https://opensource.org/license/CDDL-1.0. 11 */ 12 /* 13 * This file is part of the ZFS Event Daemon (ZED). 14 * 15 * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049). 16 * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC. 17 */ 18 19 #ifndef ZED_LOG_H 20 #define ZED_LOG_H 21 22 #include <syslog.h> 23 24 void zed_log_init(const char *identity); 25 26 void zed_log_fini(void); 27 28 void zed_log_pipe_open(void); 29 30 void zed_log_pipe_close_reads(void); 31 32 void zed_log_pipe_close_writes(void); 33 34 void zed_log_pipe_wait(void); 35 36 void zed_log_stderr_open(int priority); 37 38 void zed_log_stderr_close(void); 39 40 void zed_log_syslog_open(int facility); 41 42 void zed_log_syslog_close(void); 43 44 void zed_log_msg(int priority, const char *fmt, ...); 45 46 __attribute__((format(printf, 1, 2), __noreturn__)) 47 void zed_log_die(const char *fmt, ...); 48 49 #endif /* !ZED_LOG_H */ 50