class Build::LogColorizer

Defined in:

log_colorizer.cr

Constant Summary

LINE_REGEX = /^(.*?\[([\w\-]+)(?:[.\w]+)?\]:)(.*)?$/

Regex to parse log lines: header[identifier.suffix]: body e.g. "2024-01-15T10:30:00+00:00 app[web.1]: Starting process..." e.g. "2024-01-15T10:30:00+00:00 app[web.2c9rh]: Starting process..."

PRESET_IDENTIFIERS = ["run", "router", "web", "postgres", "heroku-postgres"] of ::String

Pre-seeded identifiers for consistent colors across runs (order matters). These common process types always get the same color.

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def colorize(line : String) : String #

[View source]