Skip to content

Use swift-log as logging system - #34

Merged
filipbodor merged 1 commit into
mainfrom
feature/PS-23075-implement-swift-log
Jan 22, 2026
Merged

Use swift-log as logging system#34
filipbodor merged 1 commit into
mainfrom
feature/PS-23075-implement-swift-log

Conversation

@filipbodor

Copy link
Copy Markdown
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")

@DominikPalo

DominikPalo commented Sep 8, 2025

Copy link
Copy Markdown
Member

@filipbodor could you please link this PR with #24 issue to make it trackable and update the status (and other details, like "assignee") of that issue? We use this approach for all other features in this library, since we don't use Jira for open-source projects.

Comment thread README.md
@filipbodor filipbodor self-assigned this Sep 9, 2025
@filipbodor filipbodor linked an issue Sep 9, 2025 that may be closed by this pull request
@filipbodor filipbodor added the feature New feature or request label Sep 9, 2025
@filipbodor
filipbodor force-pushed the feature/PS-23075-implement-swift-log branch from 038d087 to ec6371d Compare September 9, 2025 07:30
@jozefizso

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec6371db96

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/Base/OAuth2Requestable.swift
do {
let post = try deviceAuthorizationRequest(params: params).asURLRequest(for: self)
logger?.debug("OAuth2", msg: "Obtaining device code from \(post.url!)")
logger?.debug("Obtaining device code from \(post.url!)")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should remove the force unwrapping code of the post.url! in a future PR as it is a potential crash site.

@filipbodor
filipbodor force-pushed the feature/PS-23075-implement-swift-log branch 2 times, most recently from dd38732 to 6aed1ab Compare January 22, 2026 11:48
@filipbodor
filipbodor merged commit 05e1f2d into main Jan 22, 2026
15 checks passed
@filipbodor
filipbodor deleted the feature/PS-23075-implement-swift-log branch January 22, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Idea: Use the Swift Logging

3 participants