Skip to content

Conversation

@filipbodor
Copy link
Contributor

As we now use swift-log in slido for mac project, it makes sense to transfer to the logging system also in this swift library.

Removed:
I removed old logging system which was used by this library.

Implemented:
Instead of storing OAuth2Logger instance, the library will store Logger instance from swift-log framework.
I needed to change the way log messages were written:

logger.warn()                                 // -> logger.warning()
logger.info("OAuth2", msg: "message")         // -> logger.info("message")


Need to specify a separate refresh token URI? You can set the `refresh_uri` in the Settings Dictionary. If specified the library will refresh access tokens using the `refresh_uri` you specified, otherwise it will use the `token_uri`.

Need to debug? Use a `.debug` or even a `.trace` logger:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd change the wording to "logging level" since we no longer pass a logger instance here:

Suggested change
Need to debug? Use a `.debug` or even a `.trace` logger:
Need to debug? Use a `.debug` or even a `.trace` logging level:

Also, I'd probably add a small note or section mentioning that the library uses the Swift logging system, and include a link to its homepage: https://swiftpackageindex.com/apple/swift-log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants