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