-
Notifications
You must be signed in to change notification settings - Fork 161
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
Can logging be disabled? #75
Comments
I will add some documentation on how this can be done. |
I remember asking this a while back as well - the code can't be optimized away (due to the const Even in a production build where the logging may be discarded, the code is still in the optimized bundles since it can't be detected as unused/dead code by UglifyJS2. I think when I asked before you mentioned there was a way with the "Closure compiler" but I'm still not clear on that. Other optimization questions (sorry, I don't mean to hijack this issue) - is this package |
My apologies. I lost track of this. I am going to document this. Stay tuned. |
Hey @tikurahul |
I have not started on this one yet. TBH. |
Whatever method is used, can you ensure it also works for those of us using Webpack + UglifyJS? |
Yes. Will make sure I try that as well. |
Are there any updates on this ? |
Bump |
For now one can manually edit |
If you don't care too much about bundle optimization (e.g., you are working on Node cli application), the correct way (with the current codebase) to disable logging should be: const { setFlag } = require('@openid/appauth/built/flags')
// ...
setFlag('IS_LOG', false); @tikurahul let me know if I missed something. |
Expected Behavior
Ideally it would not log steps to the console by default, or logging could be disabled. I see the IS_LOG value in the "flags" module, but it's defined as a
const
and I'm not sure how I can affect that value at run time in a way to prevent logging. Thanks!Describe the problem
Actual Behavior
Currently the library prints messages to the console as it's executing, such as:
Checking to see if there is an authorization response to be delivered.
(here)Steps to reproduce the behavior
Invoking the library functions as demonstrated in the Electron sample application
Environment
The text was updated successfully, but these errors were encountered: