Skip to content

Commit 67c52a3

Browse files
committed
Add a logging protocol we can conform to
1 parent b734b91 commit 67c52a3

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Sources/CodeScanner/CodeScanner.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@
99
import AVFoundation
1010
import SwiftUI
1111

12+
public protocol CodeScannerLoggerProtocol {
13+
func log(
14+
level: String,
15+
message: String,
16+
file: String,
17+
function: String,
18+
line: UInt
19+
)
20+
}
21+
22+
public var codeScannerLogger: CodeScannerLoggerProtocol?
23+
1224
/// An enum describing the ways CodeScannerView can hit scanning problems.
1325
public enum ScanError: Error {
1426
/// The camera could not be accessed.

0 commit comments

Comments
 (0)