Enumeration
ConsoleLog
public enum ConsoleLog
A helper to send output to console/terminal/process
Relationships
Nested Types
ConsoleLog.ANSIColor
Methods
error(_:prefix:_prefixColor:)
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
Name | Type | Description |
---|---|---|
value | String |
error log |
debug(_:prefix:_prefixColor:)
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
Name | Type | Description |
---|---|---|
value | String |
debug message |