Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/sys/contrib/openzfs/cmd/zed/zed_log.h
48380 views
1
// SPDX-License-Identifier: CDDL-1.0
2
/*
3
* This file is part of the ZFS Event Daemon (ZED).
4
*
5
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
6
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
7
* Refer to the OpenZFS git commit log for authoritative copyright attribution.
8
*
9
* The contents of this file are subject to the terms of the
10
* Common Development and Distribution License Version 1.0 (CDDL-1.0).
11
* You can obtain a copy of the license from the top-level file
12
* "OPENSOLARIS.LICENSE" or at <http://opensource.org/licenses/CDDL-1.0>.
13
* You may not use this file except in compliance with the license.
14
*/
15
16
#ifndef ZED_LOG_H
17
#define ZED_LOG_H
18
19
#include <syslog.h>
20
21
void zed_log_init(const char *identity);
22
23
void zed_log_fini(void);
24
25
void zed_log_pipe_open(void);
26
27
void zed_log_pipe_close_reads(void);
28
29
void zed_log_pipe_close_writes(void);
30
31
void zed_log_pipe_wait(void);
32
33
void zed_log_stderr_open(int priority);
34
35
void zed_log_stderr_close(void);
36
37
void zed_log_syslog_open(int facility);
38
39
void zed_log_syslog_close(void);
40
41
void zed_log_msg(int priority, const char *fmt, ...);
42
43
__attribute__((format(printf, 1, 2), __noreturn__))
44
void zed_log_die(const char *fmt, ...);
45
46
#endif /* !ZED_LOG_H */
47
48