-
Notifications
You must be signed in to change notification settings - Fork 54
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
Provide a build time switch to disable logging in optimized builds #1103
Comments
Sure, while it is easy to completely disable this (or just remove some noisy lines), shouldn't we have some sort of fallback to be able to debug later on? I.e. to have some data for the users to send it back. |
Maybe check for an environment variable at startup, and remember the flag during the runtime? If set, then log. |
Yeah, this sounds as a solution. What do you think, @dewyatt? cc @ronaldtse, @rrrooommmaaa |
#ifdef DEBUG then log |
My only concern here is performance in case of large amount of log messages. Probably better to keep some global inner state variable. |
Agree with @ni4 . |
Right we may want to avoid excessive getenv invocations.
So I guess some lazily-initialized global is the quick & easy solution.
(And at some point we ought to avoid globals and encapsulate things like this in rnp_ffi_t, etc)
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
…On Monday, April 20, 2020 6:01 AM, Nickolay Olshevsky ***@***.***> wrote:
My only concern here is performance in case of large amount of log messages. Probably better to keep some global inner state variable.
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#1103 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AAFNXYKPNXE7YUNXNWNY6BLRNQMPFANCNFSM4MLY3PNQ).
|
Okay, so let's stick to this strategy:
@rrrooommmaaa Would you like to take this issue? |
Anyone interested in this? We need to get this going. Thanks! Ping @rrrooommmaaa @joke325 . |
During execution with real world keys, RNP dumps lots of warnings on the console, apparently from RNP_LOG
Could you please provide a mechanism to disable those in an optimized build?
The text was updated successfully, but these errors were encountered: