X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Flttng.h;h=f0be224b53c1b2343c2e34961bf7a5f18dd3982c;hb=cde3e505b7948c15880114268534d21fb1f10a1c;hp=85fdfaa257605f36ebbd7d99030e8f3ca32e97b9;hpb=4634f12e972571bf8ab9cb3892e1d472aa7e0ddc;p=lttng-tools.git diff --git a/include/lttng/lttng.h b/include/lttng/lttng.h index 85fdfaa25..f0be224b5 100644 --- a/include/lttng/lttng.h +++ b/include/lttng/lttng.h @@ -23,7 +23,17 @@ #define LTTNG_H #include +/* + * Necessary to include the fixed width type limits on glibc versions older + * than 2.18 when building with a C++ compiler. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS #include +#undef __STDC_LIMIT_MACROS +#else /* #ifndef __STDC_LIMIT_MACROS */ +#include +#endif /* #else #ifndef __STDC_LIMIT_MACROS */ #include /* Error codes that can be returned by API calls */ @@ -95,6 +105,22 @@ enum lttng_loglevel { LTTNG_LOGLEVEL_DEBUG = 14, }; +/* + * Available loglevels for the JUL domain. Those are an exact map from the + * class java.util.logging.Level. + */ +enum lttng_loglevel_jul { + LTTNG_LOGLEVEL_JUL_OFF = INT32_MAX, + LTTNG_LOGLEVEL_JUL_SEVERE = 1000, + LTTNG_LOGLEVEL_JUL_WARNING = 900, + LTTNG_LOGLEVEL_JUL_INFO = 800, + LTTNG_LOGLEVEL_JUL_CONFIG = 700, + LTTNG_LOGLEVEL_JUL_FINE = 500, + LTTNG_LOGLEVEL_JUL_FINER = 400, + LTTNG_LOGLEVEL_JUL_FINEST = 300, + LTTNG_LOGLEVEL_JUL_ALL = INT32_MIN, +}; + /* * LTTng consumer mode */