File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
import Foundation
2
2
3
- open class BufferedOutput : Output {
3
+ open class BufferedOutput : InstantiatableOutput {
4
4
private let dateProvider : DateProvider = DefaultDateProvider ( )
5
5
internal let readWriteQueue = DispatchQueue ( label: " com.cookpad.Puree.Logger.BufferedOutput " , qos: . background)
6
6
7
- public init ( logStore: LogStore , tagPattern: TagPattern ) {
7
+ required public init ( logStore: LogStore , tagPattern: TagPattern , options : OutputOptions ? = nil ) {
8
8
self . logStore = logStore
9
9
self . tagPattern = tagPattern
10
10
}
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ class LoggerTests: XCTestCase {
57
57
XCTAssertEqual ( buffer. logs ( for: " pv " ) . count, 1 )
58
58
59
59
let log = buffer. logs ( for: " pv " ) . first!
60
- guard let userInfo = try ? JSONSerialization . jsonObject ( with: log. userData!, options: [ ] ) as! [ String : Any ] else {
60
+ guard let userInfo = try ? ( JSONSerialization . jsonObject ( with: log. userData!, options: [ ] ) as! [ String : Any ] ) else {
61
61
return XCTFail ( " userInfo could not decoded " )
62
62
}
63
63
XCTAssertEqual ( userInfo [ " page_name " ] as! String , " Top " )
@@ -191,7 +191,7 @@ class LoggerTests: XCTestCase {
191
191
192
192
for index in testIndices {
193
193
let found = logs. contains { log -> Bool in
194
- guard let userInfo = try ? JSONSerialization . jsonObject ( with: log. userData!, options: [ ] ) as! [ String : Any ] else {
194
+ guard let userInfo = try ? JSONSerialization . jsonObject ( with: log. userData!, options: [ ] ) as? [ String : Any ] else {
195
195
XCTFail ( " userInfo could not decoded " )
196
196
return false
197
197
}
You can’t perform that action at this time.
0 commit comments