Log
open class Log : CoatyObject
Represents a log object.
-
Undocumented
Declaration
Swift
override open class var objectType: String { get }
-
The level of logging.
Declaration
Swift
public var logLevel: LogLevel
-
The message to log.
Declaration
Swift
public var logMessage: String
-
Timestamp string in ISO 8601 format (with or without timezone offset).
Declaration
Swift
public var logDate: String
-
Represents a series of tags assigned to this Log object (optional). Tags are used to categorize or filter log output. Agents may introduce specific tags, such as “service” or “app”.
Declaration
Swift
public var logTags: [String]?
-
Represents a set of key-value label pairs, used to add context-specific information to this log object (optional).
Labels are useful in providing multi-dimensional data along a log entry to be exploited by external logging services, such as Prometheus.
Any label value must be JSON compatible.
Declaration
Swift
public var logLabels: [String : Any]?
-
Information about the host environment in which this log object is created (optional).
Typically, this information is just send once as part of an initial advertised log event. Further log records need not specify this information because it can be correlated automatically by the event source ID.
Declaration
Swift
public var logHost: LogHost?
-
Default initializer for a
Log
object.Declaration
Swift
public init(logLevel: LogLevel, logMessage: String, logDate: String, name: String = "LogObject", objectType: String = Log.objectType, objectId: CoatyUUID = .init(), logTags: [String]? = nil, logLabels: [String: Any]? = nil, logHost: LogHost? = nil)
-
Undocumented
Declaration
Swift
public required init(from decoder: Decoder) throws
-
Undocumented
Declaration
Swift
open override func encode(to encoder: Encoder) throws