You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am assigning a custom logger class to my oAuth2 instance (using the OAuth2CodeGrant).
Unfortunately in verbose mode the superclass (ultimately the OAuth2Requestable) will automatically create a OAuth2DebugLogger internally and log to it before there is the chance to apply a custom logger to the oAuth2 instance.
This results in a log like this:
[Debug] OAuth2: Initialization finished
[Debug] OAuth2: Looking for items in keychain
[Debug] OAuth2: Found access token, valid until 2024-04-22 09:50:02 +0000
[Debug] OAuth2: Found refresh token
[Debug] OAuth2: Found id token
2024-04-22 11:48:58.523 [INFO] Something, something, my own logging
Extending the OAuth2DebugLogger to implement my own logger logic does not seem to work. The extended apparently does not get called for some reason. I'm not entirely sure why, but it may be due to the OAuth2 dependency not calling stuff from classes that got extended outside the dependency itself.
My suggestion would be to allow specifying a logger instance during the OAuth2CodeGrant(settings: []) initializer that will already be used for verbose logging.
The text was updated successfully, but these errors were encountered:
I am assigning a custom logger class to my oAuth2 instance (using the
OAuth2CodeGrant
).Unfortunately in verbose mode the superclass (ultimately the
OAuth2Requestable
) will automatically create aOAuth2DebugLogger
internally and log to it before there is the chance to apply a custom logger to the oAuth2 instance.This results in a log like this:
Extending the
OAuth2DebugLogger
to implement my own logger logic does not seem to work. The extended apparently does not get called for some reason. I'm not entirely sure why, but it may be due to the OAuth2 dependency not calling stuff from classes that got extended outside the dependency itself.The following sadly does not do the trick.
My suggestion would be to allow specifying a logger instance during the
OAuth2CodeGrant(settings: [])
initializer that will already be used for verbose logging.The text was updated successfully, but these errors were encountered: