Skip to content

Commit 13a81f9

Browse files
committed
feat: added default XCodeFormatter to OSLogTransport configuration
1 parent 4f8d2ea commit 13a81f9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Glider/Sources/Transports/Console/OSLogTransport.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,14 @@ extension OSLogTransport {
126126

127127
// MARK: - Initialization
128128

129-
public init(_ builder: ((inout Configuration) -> Void)?) {
129+
/// Initialize a new configuration for `OSLogTransport`.
130+
///
131+
/// - Parameters:
132+
/// - formatters: formatters to use. Ignore to use the default `XCodeFormatter`.
133+
/// - builder: builder configuration function.
134+
public init(formatters: [EventMessageFormatter] = [XCodeFormatter.init()],
135+
_ builder: ((inout Configuration) -> Void)?) {
136+
self.formatters = formatters
130137
self.queue = DispatchQueue(label: String(describing: type(of: self)), attributes: [])
131138
builder?(&self)
132139
}

0 commit comments

Comments
 (0)