]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
replicator: Add "replication" category to events
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 27 Oct 2022 08:54:29 +0000 (11:54 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 31 Oct 2022 12:09:10 +0000 (14:09 +0200)
src/replication/replicator/doveadm-connection.c
src/replication/replicator/dsync-client.c
src/replication/replicator/notify-connection.c
src/replication/replicator/replicator-queue.c
src/replication/replicator/replicator-settings.c
src/replication/replicator/replicator-settings.h

index 143e6e7bfbf5755753560d549c7aaca80f92674e..7b188a570564c8c6851b9b5abc0efa75d7f72bc7 100644 (file)
@@ -324,6 +324,7 @@ void doveadm_connection_create(struct replicator_brain *brain, int fd)
        client->brain = brain;
        connection_init_server(doveadm_connections, &client->conn,
                               "doveadm-client", fd, fd);
+       event_add_category(client->conn.event, &event_category_replication);
 }
 
 static struct connection_settings doveadm_conn_set = {
index 650d642535791398343220703942b0aa6d05bde8..a0208e49c02ebbcf5bab5efc83c491024cc515f4 100644 (file)
@@ -7,6 +7,7 @@
 #include "ostream.h"
 #include "str.h"
 #include "strescape.h"
+#include "replicator-settings.h"
 #include "dsync-client.h"
 
 #include <unistd.h>
@@ -45,6 +46,7 @@ dsync_client_init(const char *path, const char *dsync_params)
        client->fd = -1;
        client->dsync_params = i_strdup(dsync_params);
        client->event = event_create(NULL);
+       event_add_category(client->event, &event_category_replication);
        event_set_append_log_prefix(client->event, t_strdup_printf(
                "%s: ", client->path));
        return client;
index c70f1404ccce399577cd19227c792d5527f9c060..3b14654f65c88fa7ac4b5375f69a98497e047de4 100644 (file)
@@ -6,6 +6,7 @@
 #include "ostream.h"
 #include "strescape.h"
 #include "master-service.h"
+#include "replicator-settings.h"
 #include "replicator-queue-private.h"
 #include "notify-connection.h"
 
@@ -153,6 +154,7 @@ notify_connection_create(int fd, struct replicator_queue *queue)
        conn = i_new(struct notify_connection, 1);
        conn->refcount = 1;
        conn->event = event_create(queue->event);
+       event_add_category(conn->event, &event_category_replication);
        conn->queue = queue;
        conn->fd = fd;
        conn->input = i_stream_create_fd(fd, MAX_INBUF_SIZE);
index 0a602020758348b3b55666ff16f8d65bf439241e..9465dad97a5b732ba5a31e4e9fbcdb1ca389dda6 100644 (file)
@@ -9,6 +9,7 @@
 #include "strescape.h"
 #include "hash.h"
 #include "replicator-queue-private.h"
+#include "replicator-settings.h"
 
 #include <unistd.h>
 #include <fcntl.h>
@@ -109,6 +110,7 @@ replicator_queue_init(unsigned int full_sync_interval,
                          str_hash, strcmp);
        i_array_init(&queue->sync_lookups, 32);
        queue->event = event_create(NULL);
+       event_add_category(queue->event, &event_category_replication);
        return queue;
 }
 
index 3965100d6b434bf951cfb4cebb5f5041dc690ce9..beab0a359bc1d803503741fbb37ae28f215d3381 100644 (file)
@@ -6,6 +6,10 @@
 #include "service-settings.h"
 #include "replicator-settings.h"
 
+struct event_category event_category_replication = {
+       .name = "replication"
+};
+
 /* <settings checks> */
 static struct file_listener_settings replicator_unix_listeners_array[] = {
        { "replicator", 0600, "$default_internal_user", "" },
index 947bcf8e3150176bfa405e97e7468394390aea06..5e0f6569cbabb127c9a52cb005dbb87f4e554f06 100644 (file)
@@ -12,5 +12,6 @@ struct replicator_settings {
 
 extern const struct setting_parser_info replicator_setting_parser_info;
 extern const struct replicator_settings *replicator_settings;
+extern struct event_category event_category_replication;
 
 #endif