Skip to content

Commit

Permalink
log: do not set libyang's logging callback
Browse files Browse the repository at this point in the history
Bug: #476
  • Loading branch information
jktjkt authored and michalvasko committed Apr 10, 2024
1 parent 2e99476 commit f48318a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
10 changes: 0 additions & 10 deletions src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,8 @@ prv_printf(const struct nc_session *session, NC_VERB_LEVEL level, const char *fo
va_end(ap);
}

static void
nc_ly_log_clb(LY_LOG_LEVEL lvl, const char *msg, const char *UNUSED(data_path), const char *UNUSED(schema_path),
uint64_t UNUSED(line))
{
if (print_clb) {
print_clb(NULL, (NC_VERB_LEVEL)lvl, msg);
}
}

API void
nc_set_print_clb_session(void (*clb)(const struct nc_session *, NC_VERB_LEVEL, const char *))
{
print_clb = clb;
ly_set_log_clb(nc_ly_log_clb);
}
2 changes: 0 additions & 2 deletions src/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ void nc_libssh_thread_verbosity(int level);
/**
* @brief Set libnetconf print callback.
*
* This callback is set for libnetconf2 and also libyang that is used internally. libyang
* callback can be set explicitly, but must be done so after calling this function.
* The callback is not set per-session, it is a global resource. It might be called with
* a NULL session parameter.
*
Expand Down

0 comments on commit f48318a

Please sign in to comment.