1 | /* |
1 | /* |
2 | slog.h -- logging |
2 | slog.h -- logging |
|
|
3 | |
3 | Copyright (C) 2003 Marc Lehmannn <pcg@goof.com> |
4 | Copyright (C) 2003 Marc Lehmann <pcg@goof.com> |
4 | |
5 | |
5 | This program is free software; you can redistribute it and/or modify |
6 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by |
7 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or |
8 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. |
9 | (at your option) any later version. |
… | |
… | |
65 | |
66 | |
66 | extern void log_to (int mask); |
67 | extern void log_to (int mask); |
67 | |
68 | |
68 | extern void slog_ (const loglevel l, const char *m, ...); |
69 | extern void slog_ (const loglevel l, const char *m, ...); |
69 | |
70 | |
70 | #ifdef __GNUC__ |
71 | #if __GNUC__ > 2 |
71 | # define slog(l, ...) do { if ((l) >= log_level) slog_ (l, __VA_ARGS__); } while (0) |
72 | # define slog(l, ...) do { if ((l) >= log_level) slog_ (l, __VA_ARGS__); } while (0) |
72 | #else |
73 | #else |
73 | # define slog slog_ |
74 | # define slog slog_ |
74 | #endif |
75 | #endif |
75 | |
76 | |