Skip to content

XRayLogEmitter

pokryfka edited this page Aug 10, 2020 · 5 revisions

XRayLogEmitter

"Emits" segments by logging them using provided logger instance.

public struct XRayLogEmitter:​ XRayEmitter

Inheritance

XRayEmitter

Initializers

init(logger:​)

Creates an instance of XRayLogEmitter.

public init(logger:​ Logger)

Parameters

  • logger:​ - logger:​ logger instance.

init(label:​onlyErrors:​)

Creates an instance of XRayLogEmitter.

public init(label:​ String? = nil, onlyErrors:​ Bool = false)

Parameters

  • label:​ - label:​ logger label used to create a logger instance.
  • onlyErrors:​ - onlyErrors:​ if true, only errors are logged.

Methods

send(_:​)

public func send(_ segment:​ XRayRecorder.Segment)

flush(_:​)

public func flush(_ callback:@escaping (Error?) -> Void)

shutdown(_:​)

public func shutdown(_ callback:@escaping (Error?) -> Void)