Skip to content

CXXCBC-54 Add log forwarding #206

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

Merged
merged 2 commits into from
Jun 21, 2022
Merged

CXXCBC-54 Add log forwarding #206

merged 2 commits into from
Jun 21, 2022

Conversation

davidkelly
Copy link
Contributor

Motivation

When the client is used in the sdk wrappers (python, node, etc...), it
would be nice to allow the logging to be forwarded to the wrapper's
logging handlers.

Modification

Simplest thing to do is add a spdlog::sinks::sink to the logger
configuration. If it is set, we add it. Then the wrappers can
implement a sink that does the handoff.

Results

I didn't add tests, as there are no logging tests anyways. I did for
the transactions logging, and I've used this in python.

Motivation
==========
When the client is used in the sdk wrappers (python, node, etc...), it
would be nice to allow the logging to be forwarded to the wrapper's
logging handlers.

Modification
============
Simplest thing to do is add a spdlog::sinks::sink to the logger
configuration.  If it is set, we add it.   Then the wrappers can
implement a sink that does the handoff.

Results
=======
I didn't add tests, as there are no logging tests anyways.  I did for
the transactions logging, and I've used this in python.
@davidkelly davidkelly requested review from avsej and brett19 June 16, 2022 20:28
@avsej avsej merged commit 5c24a28 into main Jun 21, 2022
@avsej avsej deleted the dk/cxxcbc-54 branch June 21, 2022 18:53
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