|
|
@ -23,7 +23,7 @@ class BasicFormatter < SemanticLogger::Formatters::Color |
|
|
|
return unless log.message |
|
|
|
|
|
|
|
msg = log.message |
|
|
|
prefix = "#{color}--#{color_map.clear}" |
|
|
|
prefix = "#{color} #{color_map.clear}" |
|
|
|
|
|
|
|
case log.level |
|
|
|
when :info |
|
|
@ -39,6 +39,14 @@ class BasicFormatter < SemanticLogger::Formatters::Color |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
def level |
|
|
|
"#{color}╣#{log.level.to_s.chr.upcase}╠#{color_map.clear}" |
|
|
|
end |
|
|
|
|
|
|
|
def name |
|
|
|
"#{color}#{log.name.ljust(20)}#{color_map.clear}" |
|
|
|
end |
|
|
|
|
|
|
|
def process_info |
|
|
|
fname = file_name_and_line |
|
|
|
"#{color}[#{fname}]#{color_map.clear}" if fname |
|
|
@ -64,6 +72,6 @@ class BasicFormatter < SemanticLogger::Formatters::Color |
|
|
|
self.log = log |
|
|
|
self.logger = logger |
|
|
|
|
|
|
|
[level, tags, named_tags, duration, name, message, payload, exception].compact.join(' ') |
|
|
|
[name, level, tags, named_tags, duration, message, payload, exception].compact.join(' ') |
|
|
|
end |
|
|
|
end |