Angular-auth-oidc-client: LogLevel has only 3 level. but cannot disable it in version 11?

Created on 4 Jun 2020  路  8Comments  路  Source: damienbod/angular-auth-oidc-client

Describe the bug
LogLevel has only 3 level. but cannot disable it in version 11?

Expected behavior
Add disable enum

enhancement

Most helpful comment

yeap, sure. thank you @joffarex

All 8 comments

It is optional parameter, you can just not pass it at all so you will not get any logging.

I would have to remove the parameter entirely in the app.module.
Should we add LogLevel.none to disable it instead so that we don't touch the code in the app.module?

This will be helpful if we would want to debug on dev environment without pushing another changes to the code just to turn on/off the logging.

Well, as of now, you could extract config object and do an property attaching depending on your environment.

yeap, sure. thank you @joffarex

Is the PR helping you?

@FabianGosebrink seems good to me! Thank you.
Just one question more for the PR, logLevel in configAuth() is default to none if environment is production right?

We do not take the switch if you are running in production or not. Therefore we have to enhance the config for that. So the default would be fix for env and dev in this case. Default is Warn if nothing is given.

https://github.com/damienbod/angular-auth-oidc-client/blob/master/projects/angular-auth-oidc-client/src/lib/config/default-config.ts#L25

fixed, will be released in the next version

Was this page helpful?
0 / 5 - 0 ratings