module Stacker::Logger

Defined in:

stacker/logger.cr

Constant Summary

SEVERITY_MAP = {"trace" => ::Log::Severity::Trace, "debug" => ::Log::Severity::Debug, "info" => ::Log::Severity::Info, "warn" => ::Log::Severity::Warn, "error" => ::Log::Severity::Error, "fatal" => ::Log::Severity::Fatal}

Class Method Summary

Class Method Detail

def self.for(source : String, level : String, backend : Log::Backend | Nil = nil) : Log #

Build a ::Log instance dedicated to a single stack build.

The severity lives on the instance, never on a shared constant: two builds running concurrently cannot change each other's verbosity, which used to leak one request's pillars into the log at the verbosity asked by another one.


[View source]
def self.severity(level : String) : Log::Severity #

Translate a log level name into a ::Log::Severity, defaulting to Info.


[View source]