Path: blob/main/sys/contrib/openzfs/cmd/zed/zed_log.h
48380 views
// SPDX-License-Identifier: CDDL-1.01/*2* This file is part of the ZFS Event Daemon (ZED).3*4* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).5* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.6* Refer to the OpenZFS git commit log for authoritative copyright attribution.7*8* The contents of this file are subject to the terms of the9* Common Development and Distribution License Version 1.0 (CDDL-1.0).10* You can obtain a copy of the license from the top-level file11* "OPENSOLARIS.LICENSE" or at <http://opensource.org/licenses/CDDL-1.0>.12* You may not use this file except in compliance with the license.13*/1415#ifndef ZED_LOG_H16#define ZED_LOG_H1718#include <syslog.h>1920void zed_log_init(const char *identity);2122void zed_log_fini(void);2324void zed_log_pipe_open(void);2526void zed_log_pipe_close_reads(void);2728void zed_log_pipe_close_writes(void);2930void zed_log_pipe_wait(void);3132void zed_log_stderr_open(int priority);3334void zed_log_stderr_close(void);3536void zed_log_syslog_open(int facility);3738void zed_log_syslog_close(void);3940void zed_log_msg(int priority, const char *fmt, ...);4142__attribute__((format(printf, 1, 2), __noreturn__))43void zed_log_die(const char *fmt, ...);4445#endif /* !ZED_LOG_H */464748