X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Flog.h;h=2400092ba2b64244092e0aba2e5a0eca1f4e3da0;hb=e2ebe3e2ae8b90e52647853c4a3e9a155285e7dd;hp=7822fba50f66b9ba51943e2eef62776bfc3e799d;hpb=d660c4bcffeb56d8a967bf9de747b8fafa691445;p=i3%2Fi3 diff --git a/include/log.h b/include/log.h index 7822fba5..2400092b 100644 --- a/include/log.h +++ b/include/log.h @@ -7,8 +7,7 @@ * log.c: Logging functions. * */ -#ifndef _LOG_H -#define _LOG_H +#pragma once #include #include @@ -21,6 +20,9 @@ #if defined(ELOG) #undef ELOG #endif +#if defined(DLOG) +#undef DLOG +#endif /** ##__VA_ARGS__ means: leave out __VA_ARGS__ completely if it is empty, that is, delete the preceding comma */ #define LOG(fmt, ...) verboselog(fmt, ##__VA_ARGS__) @@ -38,6 +40,24 @@ extern int shmlog_size; */ void init_logging(void); +/** + * Opens the logbuffer. + * + */ +void open_logbuffer(void); + +/** + * Closes the logbuffer. + * + */ +void close_logbuffer(void); + +/** + * Checks if debug logging is active. + * + */ +bool get_debug_logging(void); + /** * Set debug logging. * @@ -81,5 +101,3 @@ void verboselog(char *fmt, ...) * failures. This function is invoked automatically when exiting. */ void purge_zerobyte_logfile(void); - -#endif