]> granicus.if.org Git - zfs/blob - cmd/zed/zed_log.h
d963089d03a2da2d67614df842a4324da747f48f
[zfs] / cmd / zed / zed_log.h
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license from the top-level
9  * OPENSOLARIS.LICENSE or <http://opensource.org/licenses/CDDL-1.0>.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each file
14  * and include the License file from the top-level OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21
22 /*
23  * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
24  * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
25  */
26
27 #ifndef ZED_LOG_H
28 #define ZED_LOG_H
29
30 #include <syslog.h>
31
32 void zed_log_init(const char *identity);
33
34 void zed_log_fini(void);
35
36 void zed_log_pipe_open(void);
37
38 void zed_log_pipe_close_reads(void);
39
40 void zed_log_pipe_close_writes(void);
41
42 void zed_log_pipe_wait(void);
43
44 void zed_log_stderr_open(int priority);
45
46 void zed_log_stderr_close(void);
47
48 void zed_log_syslog_open(int facility);
49
50 void zed_log_syslog_close(void);
51
52 void zed_log_msg(int priority, const char *fmt, ...);
53
54 void zed_log_die(const char *fmt, ...);
55
56 #endif  /* !ZED_LOG_H */