Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* all active backends.
*/
+static void debug_file_log(int msg_level,
+ const char *msg, const char *msg_no_nl)
+{
+ check_log_size();
+ write(state.fd, msg, strlen(msg));
+}
+
static struct debug_backend {
const char *name;
int log_level;
void (*reload)(bool enabled, bool prev_enabled, const char *prog_name);
void (*log)(int msg_level, const char *msg, const char *msg_no_nl);
} debug_backends[] = {
+ {
+ .name = "file",
+ .log = debug_file_log,
+ },
};
static struct debug_backend *debug_find_backend(const char *name)