ColorTable
public protocol ColorTable
ColorTable
s are used to supply foreground and background Color
values
for a given LogSeverity
.
-
Returns the foreground color to use (if any) for colorizing messages at the given
LogSeverity
.Declaration
Swift
func foreground(forSeverity severity: LogSeverity) -> Color?
Parameters
severity
The
LogSeverity
whose color information is being retrieved.Return Value
The foreground
Color
to use forseverity
, ornil
if no color is specified. -
background(forSeverity:)
Default implementationReturns the background color to use (if any) for colorizing messages at the given
LogSeverity
.Default Implementation
A default function implementation to always return
nil
indicating that no background color information is specified. By default,ColorTable
implementations only supply foreground color information.Declaration
Swift
func background(forSeverity severity: LogSeverity) -> Color?
Parameters
severity
The
LogSeverity
whose color information is being retrieved.Return Value
The background
Color
to use forseverity
, ornil
if no color is specified.