readium / swift-toolkit

A toolkit for ebooks, audiobooks and comics written in Swift
https://readium.org/mobile/
BSD 3-Clause "New" or "Revised" License
223 stars 96 forks source link

Logger doesn't log above min severity level #390

Closed ettore closed 4 months ago

ettore commented 4 months ago

Describe the bug

Depending on how the Logger is configured with R2EnableLog(withMinimumSeverityLevel:) it's possible to get into a situation where (for example) errors are not logged when min severity level is set to warning.

How to reproduce?

  1. configure logger with R2EnableLog(withMinimumSeverityLevel: .warning)
  2. trigger a log such as Logger.sharedInstance.log("msg", at: .error, file: "path", line: line)

Observe that the error is not logged.

Readium version

2.6.1

OS version

iOS 17

Testing device

iPhone 15

Environment

macOS: 13.5
platform: arm64
carthage: 0.39.1
Xcode 15.0.1
Build version 15A507

Additional context

No response