/[osn-commons]/trunk/freehttpd/log.h
ViewVC logotype

Contents of /trunk/freehttpd/log.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 46 - (show annotations)
Mon Aug 12 16:55:32 2024 UTC (7 months, 2 weeks ago) by rakinar2
File MIME type: text/x-c
File size: 511 byte(s)
feat(freehttpd): better error handling
1 #ifndef FREEHTTPD_LOG_H
2 #define FREEHTTPD_LOG_H
3
4 #ifndef NO_COLORS
5 # define COLOR(c, s) "\033[" c "m" s "\033[0m"
6 #else
7 # define COLOR(c, s) s
8 #endif
9
10 #define LOG_DEBUG COLOR ("2", "debug: ")
11 #define LOG_INFO COLOR ("1;34", "info: ")
12 #define LOG_WARN COLOR ("1;33", "warning: ")
13 #define LOG_ERR COLOR ("1;31", "error: ")
14
15 void __attribute__ ((format (printf, 1, 2))) log_msg (const char *fmt, ...);
16 void __attribute__ ((format (printf, 1, 2))) log_err (const char *fmt, ...);
17
18 #endif /* FREEHTTPD_LOG_H */

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26