-
Notifications
You must be signed in to change notification settings - Fork 687
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
Is there a way to disable the constant log string in the code? #1713
Comments
The release version currently doesn't have a way to remove them as the log suppression is purely at runtime. The dev branch has new compile time log level defines that should prune all log messages below the set level during the compilation. PcapPlusPlus/Common++/header/Logger.h Lines 26 to 37 in 3292f14
You can try that if you want. |
Can add an cmake parameter to control the log level?
I can use
|
Otherwise, it is not easy to control the compilation log level when introducing pcapplusplus as a third-party library directly. |
@heheda123123 I think it's a good idea. @seladb any comments? |
Edit: Forgot options were only booleans. |
compile any code using pcapplusplus

there are many constant string in the program
I always use
pcpp::Logger::getInstance().suppressLogs();
to disable log print, there is no need to embeded these constant string in the program.The text was updated successfully, but these errors were encountered: