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

Allow custom loggers #202

Closed
robinkrahl opened this issue May 4, 2021 · 1 comment · Fixed by #203
Closed

Allow custom loggers #202

robinkrahl opened this issue May 4, 2021 · 1 comment · Fixed by #203

Comments

@robinkrahl
Copy link
Contributor

Currently, libnitrokey prints all log messages to stderr/std::clog. It would be useful to be able to specify a custom logging function instead to allow applications to use their own logging mechanisms.

As far as I see, there already is a NitrokeyManager::set_log_function method. This function could be added to the C API and adapated to accept the log level and the raw log message instead of the fully formatted log message.

@robinkrahl
Copy link
Contributor Author

This would allow us to integrate the libnitrokey log messages with our own log messages in nitrocli, see d-e-s-o/nitrocli#177.

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 a pull request may close this issue.

1 participant