File: log.h

package info (click to toggle)
tsdecrypt 10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, stretch
  • size: 1,152 kB
  • ctags: 2,002
  • sloc: ansic: 14,373; makefile: 253; sh: 166
file content (41 lines) | stat: -rw-r--r-- 764 bytes parent folder | download | duplicates (5)
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
39
40
41
/*
 * LOG functions header file
 * Copyright (C) 2006 Unix Solutions Ltd.
 *
 * Released under MIT license.
 * See LICENSE-MIT.txt for license terms.
 */
#ifndef LOG_H
# define LOG_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdio.h>

void log_init  (char *host_ident, int use_syslog, int use_stderr, char *log_host, int log_port);
void log_close (void);

void LOG (const char *msg);

__attribute__ ((format(printf, 1, 2)))
void LOGf(const char *fmt, ...);

void log_perror(const char *message, int _errno);

void log_set_out_fd(FILE *new_out_fd);

#ifdef DEBUG
	#define dbg_LOG  LOG
	#define dbg_LOGf LOGf
#else
	#define dbg_LOG(arg)  do { /* arg */ } while(0)
	#define dbg_LOGf(...) do { /* ... */ } while(0)
#endif

#ifdef __cplusplus
}
#endif

#endif