module

Memo::BusLog

Console logging for memo-arcana: colored, timestamped lines on STDERR, with request parameters summarized and secrets redacted.

Constants

BOLD = "\e[1m"
CYAN = "\e[36m"
DIM = "\e[2m"
GRAY = "\e[90m"
GREEN = "\e[32m"
RED = "\e[31m"
RESET = "\e[0m"
SENSITIVE_KEYS = Set {"api_key", "password", "secret", "token", "key"}
YELLOW = "\e[33m"

Class methods

output

Where log lines go (specs silence it)

Source
output=(output : IO)

Where log lines go (specs silence it)

Source

Instance methods

log(msg : String)
Source
redact_db_url(url : String) : String
Source
sensitive?(key : String) : Bool
Source
summarize(data : JSON::Any) : String
Source
truncate(s : String, max : Int32 = 50) : String
Source