open62541 1.3.12
Open source implementation of OPC UA
Loading...
Searching...
No Matches
log_syslog.h
Go to the documentation of this file.
1/** This work is licensed under a Creative Commons CCZero 1.0 Universal License.
2 * See http://creativecommons.org/publicdomain/zero/1.0/ for more information.
3 *
4 * Copyright 2020 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
5 */
6
7#ifndef UA_LOG_SYSLOG_H_
8#define UA_LOG_SYSLOG_H_
9
11
13
14/** Syslog-logging is available only for Linux/Unices.
15 *
16 * open62541 log levels are translated to syslog levels as follows:
17 *
18 * UA_LOGLEVEL_TRACE => not available for syslog
19 * UA_LOGLEVEL_DEBUG => LOG_DEBUG
20 * UA_LOGLEVEL_INFO => LOG_INFO
21 * UA_LOGLEVEL_WARNING => LOG_WARNING
22 * UA_LOGLEVEL_ERROR => LOG_ERR
23 * UA_LOGLEVEL_FATAL => LOG_CRIT
24 */
25
26#if defined(__linux__) || defined(__unix__)
27
28/** Returns a syslog-logger for messages up to the specified level.
29 * The programm must call openlog(3) before using this logger. */
30UA_EXPORT UA_Logger
31UA_Log_Syslog_withLevel(UA_LogLevel minlevel);
32
33/** Log all warning levels supported by syslog (no trace-warnings).
34 * The programm must call openlog(3) before using this logger. */
35UA_EXPORT UA_Logger
36UA_Log_Syslog(void);
37
38#endif
39
41
42#endif /* UA_LOG_SYSLOG_H_ */
#define _UA_BEGIN_DECLS
#undef UA_DEBUG_DUMP_PKGS
Definition config.h:89
#define _UA_END_DECLS
Definition config.h:96
UA_LogLevel
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Definition log.h:20