diff options
author | Radek Novacek <rnovacek@redhat.com> | 2012-07-27 09:35:03 +0200 |
---|---|---|
committer | Radek Novacek <rnovacek@redhat.com> | 2012-07-27 09:35:03 +0200 |
commit | 171113535983029ab395341c8f8f3c92f320ea1a (patch) | |
tree | 2e7f2f064d29804666465166c114aa7f7845e134 /src/globals.h | |
parent | 99b6e54a64d962d226679ca290117f114eaf8245 (diff) | |
download | openlmi-providers-171113535983029ab395341c8f8f3c92f320ea1a.tar.gz openlmi-providers-171113535983029ab395341c8f8f3c92f320ea1a.tar.xz openlmi-providers-171113535983029ab395341c8f8f3c92f320ea1a.zip |
Unify logging through all providers
Needs to be ported to sfcb/pegasus standard logging, using stderr for
now.
Diffstat (limited to 'src/globals.h')
-rw-r--r-- | src/globals.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/globals.h b/src/globals.h new file mode 100644 index 0000000..4f56413 --- /dev/null +++ b/src/globals.h @@ -0,0 +1,18 @@ + +#ifndef GLOBALS_H +#define GLOBALS_H + +const char *get_system_name(); + +const char *get_system_creationg_class_name(); + +int log_level(void); +void set_log_level(int level); + +enum { NONE=0, ERROR, WARN, DEBUG }; +void _debug(int level, const char *file, int line, const char *format, ...); +#define debug(...) _debug(DEBUG, __FILE__, __LINE__, __VA_ARGS__) +#define warn(...) _debug(WARN, __FILE__, __LINE__, __VA_ARGS__) +#define error(...) _debug(ERROR, __FILE__, __LINE__, __VA_ARGS__) + +#endif
\ No newline at end of file |