-
Notifications
You must be signed in to change notification settings - Fork 896
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
Added printf/fprintf replacement for some internal modules. #1974
Conversation
e72f1a5
to
3636d9b
Compare
c97ff11
to
9552a47
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
03b406a
to
ef3e510
Compare
58150d0
to
33c496a
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
I've decided to use a similar approach as syslog does. Do do that, I've introduced a logging facility which allows the logging callback to distinguish between different nDPI components. What's your opinion on that, @IvanNardi ? The long term goal should be to get rid of all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two notes:
- we can probably remove the define
DGA_DEBUG
fromndpi_main.c
and convert the printf inndpi_ends_with
with a standardNDPI_LOG_DBG2
(not aNDPI_LOG_DGA
because it is used also by HTTP code) - there are still some
if(ndpi_verbose_dga_detection)
that can probably be removed
Other than that, it seems ok to me. Adding the facility might be a little overwhelming right now, but it serves its scope and it might be useful in future.
@utoni, any updates on this PR? |
I kind of forgot about the PR and the remaining ToDo. |
259ab20
to
6885e17
Compare
* logging is instead redirected to `ndpi_debug_printf` Signed-off-by: lns <[email protected]> Signed-off-by: Toni Uhlig <[email protected]>
6885e17
to
718e367
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
ndpi_debug_printf