1SYNCE_ERROR(3)               http://www.synce.org/              SYNCE_ERROR(3)
2
3
4

NAME

6       synce_error - error reporting functions
7

SYNOPSIS

9       #include <synce_log.h>
10
11       void _synce_log(int level, const char* file, int line, const *char format, ... );
12
13       void synce_error(const *char format, ... );
14       void synce_warning(const *char format, ... );
15       void synce_info(const *char format, ... );
16       void synce_debug(const *char format, ... );
17       void synce_trace(const *char format, ... );
18
19       void synce_warning_unless(bool condition, const *char format, ... );
20
21       void synce_log_set_level(int level);
22
23       void synce_log_use_syslog(void);
24
25

DESCRIPTION

27       The  various  synce_xxx()  logging  functions are implemented as macros
28       calling the underlying _synce_log function, but are presented  here  as
29       they  should  be  used  for  clarity.  All  accept  a format string and
30       optional arguments in the same way  as  printf(3).   synce_debug()  and
31       synce_trace() are equivalent.
32
33       synce_warning_unless()  will  only  take  action if cond evaluates to a
34       false value.
35
36       These functions will as standard log to stdout.  synce_log_use_syslog()
37       will cause the output to be sent to syslog at the appropriate priority.
38
39       synce_log_set_level()  sets  the maximum priority level that will actu‐
40       ally be output, whether to stdout or syslog, with the  default  maximum
41       level being warning.
42
43       The following defines are available, their equivalent syslog priorities
44       are also shown.
45
46              SYNCE_LOG_LEVEL_ERROR     LOG_ERR
47              SYNCE_LOG_LEVEL_WARNING   LOG_WARNING
48              SYNCE_LOG_LEVEL_INFO      LOG_INFO
49              SYNCE_LOG_LEVEL_DEBUG     LOG_DEBUG
50              SYNCE_LOG_LEVEL_TRACE     LOG_DEBUG
51
52       The following are also available for use with synce_log_set_level()
53
54              SYNCE_LOG_LEVEL_LOWEST
55              SYNCE_LOG_LEVEL_HIGHEST
56              SYNCE_LOG_LEVEL_DEFAULT
57

SEE ALSO

59       synce(7)
60
61
62
63The SynCE Project                 2008-02-23                    SYNCE_ERROR(3)
Impressum