Skip to content

Commit

Permalink
feat: added default XCodeFormatter to OSLogTransport configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
malcommac committed Jul 11, 2023
1 parent 4f8d2ea commit 13a81f9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Glider/Sources/Transports/Console/OSLogTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,14 @@ extension OSLogTransport {

// MARK: - Initialization

public init(_ builder: ((inout Configuration) -> Void)?) {
/// Initialize a new configuration for `OSLogTransport`.
///
/// - Parameters:
/// - formatters: formatters to use. Ignore to use the default `XCodeFormatter`.
/// - builder: builder configuration function.
public init(formatters: [EventMessageFormatter] = [XCodeFormatter.init()],
_ builder: ((inout Configuration) -> Void)?) {
self.formatters = formatters
self.queue = DispatchQueue(label: String(describing: type(of: self)), attributes: [])
builder?(&self)
}
Expand Down

0 comments on commit 13a81f9

Please sign in to comment.