Skip to content

Commit

Permalink
refactor: enhance debug logging for trust domain actions and auth ser…
Browse files Browse the repository at this point in the history
…ver resolution

Signed-off-by: Dengfeng Liu <[email protected]>
  • Loading branch information
liudf0716 committed Dec 12, 2024
1 parent b625fb3 commit a948335
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,8 @@ parse_domain_string_common_action(const char *ptr, trusted_domain_t which, int a
if (*tmp != '\0' && isblank(*tmp)) {
*tmp = '\0';
}
debug(LOG_DEBUG, "Adding&Delete [%d] trust domain [%s] to&from list", action, hostname);

debug(LOG_DEBUG, "[%s] trust domain [%s] to&from list", action?"add":"del", hostname);
if(action) // 1: add
__add_domain_common(hostname, which);
else {// 0: del
Expand Down
1 change: 1 addition & 0 deletions src/tls_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ check_auth_server_available_cb(int errcode, struct evutil_addrinfo *res, void *p
mark_auth_server_bad(auth_server);
return;
}
debug(LOG_INFO, "auth server dns resolve success");

struct evutil_addrinfo *addr = res;
for (; addr != NULL; addr = addr->ai_next) {
Expand Down
2 changes: 1 addition & 1 deletion src/wd_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ thread_evdns_parse_trusted_domain_2_ip(void *arg)
return;

if (!p) {
debug(LOG_DEBUG, "parsed domain list is empty");
debug(LOG_DEBUG, "parsed [%s] domain list is empty", which == INNER_TRUSTED_DOMAIN ? "inner" : "user");
return;
}

Expand Down

0 comments on commit a948335

Please sign in to comment.