SwiftKit Documentation

Enumeration Console​Log

public enum ConsoleLog  

A helper to send output to console/terminal/process

Nested Types

ConsoleLog.ANSIColor

Methods

error(_:​prefix:​_prefix​Color:​)

public static func error(_ value: String, prefix _prefix: String? = "Error", _prefixColor: ANSIColor = .red)  

send error log to console/terminal/process

  • _prefix: the prefix before the log, by default Error: my error message

  • _prefixColor: ANSI color for the prefix

Parameters

value String

error log

debug(_:​prefix:​_prefix​Color:​)

public static func debug(_ value: String, prefix _prefix: String? = nil, _prefixColor: ANSIColor = .green)  

send error log to console/terminal/process

  • _prefix: the prefix before the log, example Foo: my message

  • _prefixColor: ANSI color for the prefix

Parameters

value String

debug message