Skip to content

Commit 2b4a99c

Browse files
author
Ignacio Bonafonte
authored
Merge pull request #368 from open-telemetry/logRecord-memberwise
2 parents 2086d06 + ab8c25c commit 2b4a99c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Sources/OpenTelemetrySdk/Logs/Data/ReadableLogRecord.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ import Foundation
77
import OpenTelemetryApi
88

99
public struct ReadableLogRecord {
10+
public init(resource: Resource, instrumentationScopeInfo: InstrumentationScopeInfo, timestamp: Date, observedTimestamp: Date? = nil, spanContext: SpanContext? = nil, severity: Severity? = nil, body: String? = nil, attributes: [String : AttributeValue]) {
11+
self.resource = resource
12+
self.instrumentationScopeInfo = instrumentationScopeInfo
13+
self.timestamp = timestamp
14+
self.observedTimestamp = observedTimestamp
15+
self.spanContext = spanContext
16+
self.severity = severity
17+
self.body = body
18+
self.attributes = attributes
19+
}
20+
1021
public private(set) var resource : Resource
1122
public private(set) var instrumentationScopeInfo : InstrumentationScopeInfo
1223
public private(set) var timestamp : Date

0 commit comments

Comments
 (0)