Skip to content

Commit 1cbabd1

Browse files
committed
Refactor to make this work on a serial queue and handle failure cases
1 parent 2dfeeed commit 1cbabd1

File tree

2 files changed

+300
-242
lines changed

2 files changed

+300
-242
lines changed

Sources/CodeScanner/CodeScanner.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ public protocol CodeScannerLoggerProtocol {
2424
)
2525
}
2626

27+
extension CodeScannerLoggerProtocol {
28+
func log(
29+
level: CodeScannerLogLevel,
30+
message: String,
31+
file: String = #file,
32+
function: String = #function,
33+
line: UInt = #line
34+
) {
35+
log(level: level, message: message, file: file, function: function, line: line)
36+
}
37+
}
38+
2739
public var codeScannerLogger: CodeScannerLoggerProtocol?
2840

2941
/// An enum describing the ways CodeScannerView can hit scanning problems.

0 commit comments

Comments
 (0)