Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up log callbacks #478

Merged
merged 3 commits into from
Apr 10, 2024
Merged

clean up log callbacks #478

merged 3 commits into from
Apr 10, 2024

Conversation

jktjkt
Copy link
Contributor

@jktjkt jktjkt commented Apr 10, 2024

Fix for #476 by:

  • cleaning up some dead code in the first commit,
  • improving the docs in the second commit,
  • removal of setting the libyang logger in the third commit

You might not like the third commit, so feel free to cherry-pick what makes sense to you. I obviously still think that it's a bad idea to override a logger of another library like this, but in the end it's your call.

This second logging callback is never set.

Fixes: 0553277 log FEATURE supply session as log clb parameter
jktjkt added a commit to CESNET/CzechLight-dependencies that referenced this pull request Apr 10, 2024
jktjkt added a commit to CESNET/CzechLight-dependencies that referenced this pull request Apr 10, 2024
jktjkt added a commit to CESNET/libnetconf2-cpp that referenced this pull request Apr 10, 2024
This is really just a change of logging, nothing else. Unfortunately,
the new logging still affects a global state, it was really just a
change of the function signature, and the logger callback might well be
invoked with a NULL session. This means that mapping from the
nc_session* to a libnetconf::client::Session is not possible, so I
though that simply providing an opaque pointer is not a bad solution.

Change-Id: Iaa10855f4173fdd5e3046efa1827e4931cd05acb
Depends-on: https://gerrit.cesnet.cz/c/CzechLight/libyang-cpp/+/7049
Depends-on: CESNET/libnetconf2#477
Depends-on: CESNET/libnetconf2#478
jktjkt added a commit to CESNET/CzechLight-dependencies that referenced this pull request Apr 10, 2024
@michalvasko
Copy link
Member

Okay, I think it can be merged.

@michalvasko michalvasko merged commit f48318a into CESNET:devel Apr 10, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants