LibGd 2.4.0-dev
GD Graphics library
Loading...
Searching...
No Matches
gd_errors.h
1#ifndef GD_ERRORS_H
2#define GD_ERRORS_H
3
4#ifndef _WIN32
5#include <syslog.h>
6#else
7/*
8 * priorities/facilities are encoded into a single 32-bit quantity, where the
9 * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility
10 * (0-big number). Both the priorities and the facilities map roughly
11 * one-to-one to strings in the syslogd(8) source code. This mapping is
12 * included in this file.
13 *
14 * priorities (these are ordered)
15 */
16#define LOG_EMERG 0 /* system is unusable */
17#define LOG_ALERT 1 /* action must be taken immediately */
18#define LOG_CRIT 2 /* critical conditions */
19#define LOG_ERR 3 /* error conditions */
20#define LOG_WARNING 4 /* warning conditions */
21#define LOG_NOTICE 5 /* normal but significant condition */
22#define LOG_INFO 6 /* informational */
23#define LOG_DEBUG 7 /* debug-level messages */
24#endif
25
26/*
27LOG_EMERG system is unusable
28LOG_ALERT action must be taken immediately
29LOG_CRIT critical conditions
30LOG_ERR error conditions
31LOG_WARNING warning conditions
32LOG_NOTICE normal, but significant, condition
33LOG_INFO informational message
34LOG_DEBUG debug-level message
35*/
36
37#define GD_ERROR LOG_ERR
38#define GD_WARNING LOG_WARNING
39#define GD_NOTICE LOG_NOTICE
40#define GD_INFO LOG_INFO
41#define GD_DEBUG LOG_DEBUG
42
43void gd_error(const char *format, ...);
44void gd_error_ex(int priority, const char *format, ...);
45
46#endif