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

Add interface for changing ggwave's internal logging #52

Merged
merged 2 commits into from
Sep 21, 2021

Conversation

ggerganov
Copy link
Owner

ref #51

Using GGWave::setLogFile() it is now possible to change the log file
used internally by ggwave, or disable it all together.

The C interface function is respectively ggwave_setLogFile()

I guess we can design a better interface in the future, but for now this
seems to be simple enough and does the job.

Using GGWave::setLogFile() it is now possible to change the log file
used internally by ggwave, or disable it all together.
@gizahNL
Copy link

gizahNL commented Sep 19, 2021

Awesome :)

I see the global is not protected by a lock, so the function is not threadsafe (not a problem in my usecase), but it would be worthwhile to document it ;)

I'm assuming setting it to NULL disables logging all together?

@ggerganov
Copy link
Owner Author

Good point - will add comment that setLogFile() is not thread-safe and should not be called in parallel with other methods.

I'm assuming setting it to NULL disables logging all together?

Correct

@ggerganov ggerganov merged commit 9cf2d47 into master Sep 21, 2021
@ggerganov ggerganov deleted the ggwave/set-log-file-issue-51 branch September 21, 2021 03:48
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.

C library ggwave_decode: logging of binary data
2 participants