blob: 1cf797ae37b650159c8b6b15e58dccb53bc24b9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// SPDX-License-Identifier: LGPL-2.1-or-later
/*
* Copyright (c) 2021 Martin Wilck, SUSE LLC
*/
#ifndef _LOG_H
#define _LOG_H
#include <stdbool.h>
#include <syslog.h>
/* for nvme_root_t */
#include "tree.h"
#ifndef MAX_LOGLEVEL
# define MAX_LOGLEVEL LOG_DEBUG
#endif
#ifndef DEFAULT_LOGLEVEL
# define DEFAULT_LOGLEVEL LOG_NOTICE
#endif
/**
* DOC: log.h
*
* logging functions
*/
/**
* nvme_init_logging() - Initialize logging
* @r: nvme_root_t context
* @lvl: Logging level to set
* @log_pid: Boolean to enable logging of the PID
* @log_tstamp: Boolean to enable logging of the timestamp
*
* Sets the default logging variables for the library.
*/
void nvme_init_logging(nvme_root_t r, int lvl, bool log_pid, bool log_tstamp);
#endif /* _LOG_H */
|