yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches
log_syslog.h
Go to the documentation of this file.
1#ifndef NO_SYSLOG
2/*
3 * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4 *
5 * Unless required by applicable law or agreed to in writing,
6 * software distributed under the License is distributed on an
7 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 * KIND, either express or implied. See the License for the
9 * specific language governing permissions and limitations
10 * under the License.
11 */
12#ifndef _H_log_syslog
13#define _H_log_syslog
14/* FILE: log_syslog.h
15*********************************************************************
16* *
17* P U R P O S E *
18* *
19*********************************************************************/
20
26/*********************************************************************
27* *
28* C H A N G E H I S T O R Y *
29* *
30*********************************************************************
31
32date init comment
33----------------------------------------------------------------------
3408-jan-06 abb begun
3502-jun-2012 mts adapted from log.h
36*/
37
38#include <stdio.h>
39#include <xmlstring.h>
40
41#include "procdefs.h"
42#include "status.h"
43#include "log.h"
44#include "log.h"
45
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50/********************************************************************
51* *
52* C O N S T A N T S *
53* *
54*********************************************************************/
55#define LOG_SYSLOG_PRIO_NONE -1;
56
57/********************************************************************
58* *
59* T Y P E S *
60* *
61*********************************************************************/
62
63/********************************************************************
64* *
65* F U N C T I O N S *
66* *
67*********************************************************************/
68
69 // BEGIN ncxlib/log/syslog
78
79
84extern void
85 log_syslog_close (void);
86
87
95void
96 log_syslog_cleanup (void);
97
98
99
106extern int
108
109
115extern boolean
117
118
123extern void
124 log_syslog_connect (void);
125
126
137extern void
139 log_debug_t level,
140 const char *fstr, ...)
141 __attribute__ ((format (printf, 3, 4)));
142
143
148extern void
149 log_syslog_flush (void);
150
151
162extern void
163 log_syslog_common (boolean recursive,
164 log_debug_t level,
165 log_debug_t sub_level,
166 const char *fstr,
167 va_list args);
168
169
180extern void
181 log_syslog_append (boolean recursive,
182 log_debug_t level,
183 log_debug_t sub_level,
184 const char *fstr,
185 va_list args);
186
187
190#ifdef __cplusplus
191} /* end extern 'C' */
192#endif
193
194#endif /* _H_log_syslog */
195#endif /* NO_SYSLOG=1 */
log_debug_app_t
syslog wants to know what app is logging ...
Definition: log.h:362
log_debug_t
The debug level enumerations used in util/log.c.
Definition: log.h:343
void log_syslog_append(boolean recursive, log_debug_t level, log_debug_t sub_level, const char *fstr, va_list args)
Append formatted string output to the internal syslog log buffer.
Definition: log_syslog.c:311
void log_syslog_cleanup(void)
Cleanup syslog related logging state, if any.
Definition: log_syslog.c:147
void log_syslog_common(boolean recursive, log_debug_t level, log_debug_t sub_level, const char *fstr, va_list args)
Generate a log entry destined for vendor specific processing.
Definition: log_syslog.c:249
void void log_syslog_flush(void)
Flush contents of internal buffer to vendor logging system.
Definition: log_syslog.c:227
void log_syslog_send(log_debug_app_t app, log_debug_t level, const char *fstr,...) __attribute__((format(printf
Send log data to syslog via vsyslog()
void log_syslog_close(void)
Close down syslog connection.
Definition: log_syslog.c:127
boolean log_syslog_connected(void)
Return syslog connect status.
Definition: log_syslog.c:167
int cvt_level2syslog_prio(log_debug_t level)
Convert from log_debug (native) level to syslog priority.
Definition: log_syslog.c:89
void log_syslog_connect(void)
Connect to syslog output stream via openlog()
Definition: log_syslog.c:180
NCX System Logging Manager.
Global error messages for status code enumerations.