Skip to content

Commit

Permalink
misc: logging formats
Browse files Browse the repository at this point in the history
Signed-off-by: He Xian <hexian000@outlook.com>
  • Loading branch information
hexian000 committed Jan 24, 2024
1 parent 0f70ad1 commit a63d529
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/obfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ static void obfs_bind(struct obfs *restrict obfs, const struct sockaddr *sa)
if (LOGLEVEL(NOTICE)) {
char addr_str[64];
format_sa(sa, addr_str, sizeof(addr_str));
LOG_F(NOTICE, "obfs: bind %s", addr_str);
LOG_F(NOTICE, "obfs bind: %s", addr_str);
}
}

Expand Down Expand Up @@ -697,7 +697,7 @@ obfs_tcp_listen(struct obfs *restrict obfs, const struct sockaddr *restrict sa)
if (LOGLEVEL(INFO)) {
char addr_str[64];
format_sa(sa, addr_str, sizeof(addr_str));
LOG_F(INFO, "obfs: tcp listen %s", addr_str);
LOG_F(INFO, "obfs tcp listen: %s", addr_str);
}
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ tcp_listen(const struct config *restrict conf, const struct sockaddr *sa)
/* Start listening on the socket */
if (listen(fd, SOMAXCONN)) {
const int err = errno;
LOGE_F("tcp listen: %s", strerror(err));
LOGE_F("listen: %s", strerror(err));
CLOSE_FD(fd);
return -1;
}
Expand Down Expand Up @@ -96,7 +96,7 @@ static bool listener_start(struct server *restrict s)
if (LOGLEVEL(NOTICE)) {
char addr_str[64];
format_sa(&addr.sa, addr_str, sizeof(addr_str));
LOG_F(NOTICE, "listen at %s", addr_str);
LOG_F(NOTICE, "tcp listen: %s", addr_str);
}
}

Expand Down

0 comments on commit a63d529

Please sign in to comment.