Protocol
LoggerFragment
A fragment of a log message.
protocol LoggerFragment : Sendable
Topics
Instance Methods
func and<T>(T) -> AndFragment<Self, T>Combine the current fragment with another, which will be written after the current fragment finishes.func hasContent(record: inout LogRecord) -> BoolIndicates whether the fragment will write anything tooutputwhenwriteis called. This is used to determine whether writing a separator should be skipped.func maxLevel(Logger.Level) -> IfMaxLevelFragment<Self>Make the current fragment conditional, only calling itsoutputmethod if the record’sloggerLevelismaxLevelor lowerfunc prefixed(ConsoleText) -> AndFragment<LiteralFragment, Self>Add a literal prefix to the current fragment.func separated(ConsoleText) -> SeparatorFragment<Self>Appends the given separator text to the output beforeself’s output, as long as a separator is needed.func suffixed(ConsoleText) -> AndFragment<Self, LiteralFragment>Add a literal suffix to the current fragment.func write(inout LogRecord, to: inout FragmentOutput)Add this fragment’s output to the console text.
Relationships
Inherits From
Swift.SendableSwift.SendableMetatype