diff options
author | peterbell10 <peterbell10@live.co.uk> | 2018-01-03 18:41:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-03 18:41:16 +0100 |
commit | 757231cc6e777b8f4717d1467ef7efa01c7fde15 (patch) | |
tree | 6d1021761ad1c492700fe17560cb79520e508d60 /src/LoggerSimple.h | |
parent | Concrete mixing (#4096) (diff) | |
download | cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.gz cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.bz2 cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.lz cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.xz cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.zst cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.zip |
Diffstat (limited to 'src/LoggerSimple.h')
-rw-r--r-- | src/LoggerSimple.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/LoggerSimple.h b/src/LoggerSimple.h new file mode 100644 index 000000000..5c0487607 --- /dev/null +++ b/src/LoggerSimple.h @@ -0,0 +1,51 @@ + +// Logging free functions defined in Logger.cpp +#pragma once + +// python style format specified logging + +extern void FLOG(const char * a_Format, fmt::ArgList a_ArgList); +FMT_VARIADIC(void, FLOG, const char *) + +extern void FLOGINFO(const char * a_Format, fmt::ArgList a_ArgList); +FMT_VARIADIC(void, FLOGINFO, const char *) + +extern void FLOGWARNING(const char * a_Format, fmt::ArgList a_ArgList); +FMT_VARIADIC(void, FLOGWARNING, const char *) + +extern void FLOGERROR(const char * a_Format, fmt::ArgList a_ArgList); +FMT_VARIADIC(void, FLOGERROR, const char *) + +// printf style format specified logging (DEPRECATED) + +extern void LOG(const char * a_Format, fmt::ArgList a_ArgList); +FMT_VARIADIC(void, LOG, const char *) + +extern void LOGINFO(const char * a_Format, fmt::ArgList a_ArgList); +FMT_VARIADIC(void, LOGINFO, const char *) + +extern void LOGWARNING(const char * a_Format, fmt::ArgList a_ArgList); +FMT_VARIADIC(void, LOGWARNING, const char *) + +extern void LOGERROR(const char * a_Format, fmt::ArgList a_ArgList); +FMT_VARIADIC(void, LOGERROR, const char *) + + +// Macro variants + +// In debug builds, translate LOGD to LOG, otherwise leave it out altogether: +#ifdef _DEBUG + #define LOGD LOG +#else + #define LOGD(...) +#endif // _DEBUG + +#define LOGWARN LOGWARNING + +#ifdef _DEBUG + #define FLOGD FLOG +#else + #define FLOGD(...) +#endif // _DEBUG + +#define FLOGWARN FLOGWARNING |