Skip to content

Commit

Permalink
Don't introduce a pointless new pre-deprecated function
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoyne committed Jul 6, 2024
1 parent c85a868 commit 4f3ac24
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions RealmSwift/Logger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,6 @@ import Realm.Private
*/
public typealias Logger = RLMLogger
extension Logger {
/**
Creates a logger with the associated log level, and a logic function to define your own logging logic.
```swift
let logger = Logger(level: .info, category: Category.All, logFunction: { level, category, message in
print("\(category.rawValue) - \(level): \(message)")
})
```
- parameter level: The log level to be set for the logger.
- parameter function: The log function which will be invoked whenever there is a log message.
- note: This will set the specified log level for the log category `Category.realm`.
*/
@available(*, deprecated, message: "Use init(function:)")
public convenience init(level: LogLevel, function: @escaping @Sendable (LogLevel, LogCategory, String) -> Void) {
self.init(logFunction: { level, category, message in
function(level, ObjectiveCSupport.convert(value: category), message)
})
set(logLevel: level, for: Category.realm)
}

/**
Creates a logger with a callback, which will be invoked whenever there is a log message.
Expand Down

0 comments on commit 4f3ac24

Please sign in to comment.