summaryrefslogtreecommitdiff
path: root/include/hybbx/security.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hybbx/security.h')
-rw-r--r--include/hybbx/security.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/hybbx/security.h b/include/hybbx/security.h
new file mode 100644
index 0000000..f4a9476
--- /dev/null
+++ b/include/hybbx/security.h
@@ -0,0 +1,31 @@
+#ifndef HYBBX_SECURITY_H
+#define HYBBX_SECURITY_H
+
+#include "hybbx/types.h"
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct hybbx_config;
+
+/** Log file name under the configured logs directory. */
+#define HYBBX_SECURITY_LOG_FILE "security.log"
+
+void hybbx_security_log_config_apply(const struct hybbx_config *config);
+void hybbx_security_log_shutdown(void);
+
+/** Append one line to security.log (timestamp added). Always enabled when the log directory is available. */
+void hybbx_security_log_write(const char *fmt, ...)
+ __attribute__((format(printf, 1, 2)));
+
+/** Absolute path to security.log when the security log is ready. */
+hybbx_result_t hybbx_security_log_current_path(char *out, size_t out_len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* HYBBX_SECURITY_H */
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com