Skip to content

Commit

Permalink
afsocket: remove connection open/close messages from normal log level
Browse files Browse the repository at this point in the history
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
  • Loading branch information
bazsi committed Oct 21, 2024
1 parent 8d8eab0 commit 0f00114
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions modules/afsocket/afsocket-source.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,16 +533,10 @@ afsocket_sd_accept(gpointer s)
{
socket_options_setup_peer_socket(self->socket_options, new_fd, peer_addr);

if (peer_addr->sa.sa_family != AF_UNIX)
msg_notice("Syslog connection accepted",
evt_tag_int("fd", new_fd),
evt_tag_str("client", g_sockaddr_format(peer_addr, buf1, sizeof(buf1), GSA_FULL)),
evt_tag_str("local", g_sockaddr_format(self->bind_addr, buf2, sizeof(buf2), GSA_FULL)));
else
msg_verbose("Syslog connection accepted",
evt_tag_int("fd", new_fd),
evt_tag_str("client", g_sockaddr_format(peer_addr, buf1, sizeof(buf1), GSA_FULL)),
evt_tag_str("local", g_sockaddr_format(self->bind_addr, buf2, sizeof(buf2), GSA_FULL)));
msg_verbose("Syslog connection accepted",
evt_tag_int("fd", new_fd),
evt_tag_str("client", g_sockaddr_format(peer_addr, buf1, sizeof(buf1), GSA_FULL)),
evt_tag_str("local", g_sockaddr_format(self->bind_addr, buf2, sizeof(buf2), GSA_FULL)));
}
else
{
Expand All @@ -560,16 +554,10 @@ afsocket_sd_close_connection(AFSocketSourceDriver *self, AFSocketSourceConnectio
{
gchar buf1[MAX_SOCKADDR_STRING], buf2[MAX_SOCKADDR_STRING];

if (sc->peer_addr->sa.sa_family != AF_UNIX)
msg_notice("Syslog connection closed",
evt_tag_int("fd", sc->sock),
evt_tag_str("client", g_sockaddr_format(sc->peer_addr, buf1, sizeof(buf1), GSA_FULL)),
evt_tag_str("local", g_sockaddr_format(self->bind_addr, buf2, sizeof(buf2), GSA_FULL)));
else
msg_verbose("Syslog connection closed",
evt_tag_int("fd", sc->sock),
evt_tag_str("client", g_sockaddr_format(sc->peer_addr, buf1, sizeof(buf1), GSA_FULL)),
evt_tag_str("local", g_sockaddr_format(self->bind_addr, buf2, sizeof(buf2), GSA_FULL)));
msg_verbose("Syslog connection closed",
evt_tag_int("fd", sc->sock),
evt_tag_str("client", g_sockaddr_format(sc->peer_addr, buf1, sizeof(buf1), GSA_FULL)),
evt_tag_str("local", g_sockaddr_format(self->bind_addr, buf2, sizeof(buf2), GSA_FULL)));

log_reader_close_proto(sc->reader);
log_pipe_deinit(&sc->super);
Expand Down

0 comments on commit 0f00114

Please sign in to comment.