module

Quartz::QLog

Constants

COLOR_FORMAT = ::Log::Formatter.new do |entry, io| color = case entry.severity when .trace? "\e[90m" when .debug? "\e[36m" when .info? "\e[32m" when .warn? "\e[33m" when .error? "\e[31m" when .fatal? "\e[35m" else "\e[0m" end ((io << "\e[90m") << entry.timestamp.to_rfc3339) << "\e[0m " ((io << color) << (entry.severity.label.ljust(5))) << "\e[0m " (((io << "\e[90m") << entry.source) << "\e[0m - ") << entry.message if ex = entry.exception (((io << ' ') << ex.class) << ": ") << ex.message end end
LEVELS = {"debug" => ::Log::Severity::Debug, "info" => ::Log::Severity::Info, "warn" => ::Log::Severity::Warn, "error" => ::Log::Severity::Error}
PLAIN_FORMAT = ::Log::Formatter.new do |entry, io| (io << entry.timestamp.to_rfc3339) << ' ' (io << (entry.severity.label.ljust(5))) << ' ' ((io << entry.source) << " - ") << entry.message if ex = entry.exception (((io << ' ') << ex.class) << ": ") << ex.message end end

Instance methods

parse_env_level(value : String | Nil) : ::Log::Severity | Nil
Source
setup(verbosity : Int32 = 0, io : IO = STDERR) : Nil
Source
verbosity_to_level(count : Int32) : ::Log::Severity

Maps -v count (0..3+) to severity

Source