You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
583 B

  1. # My Custom colorized formatter
  2. class BasicFormatter < SemanticLogger::Formatters::Color
  3. ANSI_REVERSED_ERROR = "\e[1m\e[7m\e[91m".freeze
  4. # Return the complete log level name in uppercase
  5. def initialize
  6. # super(ap: { multiline: true },
  7. # time_format: "%H:%M:%S",
  8. # color_map: {
  9. # info: SemanticLogger::AnsiColors::RED,
  10. # warn: SemanticLogger::AnsiColors::YELLOW,
  11. # })
  12. super(time_format: "%H:%M:%S", color_map: ColorMap.new(info: SemanticLogger::AnsiColors::RED, warn: SemanticLogger::AnsiColors::YELLOW))
  13. end
  14. end