FlintLoggable
public protocol FlintLoggable
The protocol to which Inputs must conform to be logged usefully by Flint’s logging, Timeline, Action Stacks etc.
Flint requires a human readable description of all inputs to use in logs and debug UI, as well as a structured data representation for use in machine-readable outputs.
We cannot rely on CustomStringConvertible
and CustomDebugStringConvertible
for this as the developer may
not control the contents of these, and the semantics are not rigid enough for our use.
-
loggingDescription
Default implementationMust return a human-readable description the type for use in logs and debug UI
Default Implementation
By default use
debugDescription
if it is supported, if not fall back to debug description. It is much better to provide a meaningful implementation on your own typesDeclaration
Swift
var loggingDescription: String { get }
-
loggingInfo
Default implementationMust return a machine-readable set of properties describing the type, for use in exported reports for later structure analysis or querying. !!! TODO: How should we handle this in terms of performance, memory and nesting? Just a flat chunk of data for now
Default Implementation
Declaration
Swift
var loggingInfo: [String : String]? { get }
-
isImmutableForLogging
Default implementationUndocumented
Default Implementation
Undocumented
Declaration
Swift
static var isImmutableForLogging: Bool { get }