summaryrefslogtreecommitdiff
path: root/other/bootstrap_daemon/src/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'other/bootstrap_daemon/src/log.h')
-rw-r--r--other/bootstrap_daemon/src/log.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/other/bootstrap_daemon/src/log.h b/other/bootstrap_daemon/src/log.h
index ab7cd30b..a810d997 100644
--- a/other/bootstrap_daemon/src/log.h
+++ b/other/bootstrap_daemon/src/log.h
@@ -27,6 +27,8 @@
27 27
28#include <stdbool.h> 28#include <stdbool.h>
29 29
30#include "../../../toxcore/ccompat.h"
31
30typedef enum LOG_BACKEND { 32typedef enum LOG_BACKEND {
31 LOG_BACKEND_STDOUT, 33 LOG_BACKEND_STDOUT,
32 LOG_BACKEND_SYSLOG 34 LOG_BACKEND_SYSLOG
@@ -41,13 +43,13 @@ typedef enum LOG_LEVEL {
41/** 43/**
42 * Initializes logger. 44 * Initializes logger.
43 * @param backend Specifies which backend to use. 45 * @param backend Specifies which backend to use.
44 * @return true on success, flase if log is already opened. 46 * @return true on success, false if log is already opened.
45 */ 47 */
46bool log_open(LOG_BACKEND backend); 48bool log_open(LOG_BACKEND backend);
47 49
48/** 50/**
49 * Releases all used resources by the logger. 51 * Releases all used resources by the logger.
50 * @return true on success, flase if log is already closed. 52 * @return true on success, false if log is already closed.
51 */ 53 */
52bool log_close(void); 54bool log_close(void);
53 55
@@ -56,9 +58,9 @@ bool log_close(void);
56 * @param level Log level to use. 58 * @param level Log level to use.
57 * @param format printf-like format string. 59 * @param format printf-like format string.
58 * @param ... Zero or more arguments, similar to printf function. 60 * @param ... Zero or more arguments, similar to printf function.
59 * @return true on success, flase if log is closed. 61 * @return true on success, false if log is closed.
60 */ 62 */
61bool log_write(LOG_LEVEL level, const char *format, ...); 63bool log_write(LOG_LEVEL level, const char *format, ...) GNU_PRINTF(2, 3);
62 64
63 65
64#endif // LOG_H 66#endif // LOG_H