Skip to content

Commit

Permalink
Merge pull request #811 from openziti/allow-debugging-controller-inte…
Browse files Browse the repository at this point in the history
…ractions

Allow better dev debugging
  • Loading branch information
ekoby authored Jan 20, 2025
2 parents ff6025f + ffd1e5a commit cc66c69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,11 @@ static const char *basename(const char *path) {
}

void ziti_logger(int level, const char *module, const char *file, unsigned int line, const char *func, FORMAT_STRING(const char *fmt), ...) {
#ifdef ZITI_DEBUG
static size_t loglinelen = 32768;
#else
static size_t loglinelen = 1024;
#endif

log_writer logfunc = logger;
if (logfunc == NULL) { return; }
Expand Down
1 change: 1 addition & 0 deletions library/ziti_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ static void ctrl_body_cb(tlsuv_http_req_t *req, char *b, ssize_t len) {
if (len > 0) {
if (resp->resp_content == ctrl_content_json) {
if (resp->content == NULL) {
CTRL_LOG(VERBOSE, "HTTP RESPONSE: %.*s", (int)len, b);
resp->content = json_tokener_parse_ex(resp->content_proc, b, (int) len);
if (resp->content == NULL && json_tokener_get_error(resp->content_proc) != json_tokener_continue) {
CTRL_LOG(WARN, "parsing error: %s",
Expand Down

0 comments on commit cc66c69

Please sign in to comment.