From 4c9c8009cb7a79b13370ef83d17ec6c07867ef92 Mon Sep 17 00:00:00 2001 From: pvincent Date: Mon, 15 Jan 2024 23:00:53 +0400 Subject: [PATCH] wrap + object OK --- app/controllers/scores_controller.rb | 13 ++++++------- lib/formatters/basic_formatter.rb | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/controllers/scores_controller.rb b/app/controllers/scores_controller.rb index 95c1ccc..41e3290 100644 --- a/app/controllers/scores_controller.rb +++ b/app/controllers/scores_controller.rb @@ -5,15 +5,14 @@ class ScoresController < ApplicationController # GET /scores def index @scores = Score.all - # logger.debug 'this is a debug message' - logger.info(' ' + '*' * 200) + logger.debug 'this is a debug message' logger.debug({ 'one': 1, 'two': 2 }) logger.info 'this is an information', { 'four': 4, 'five': 5 } - # logger.info 'this is an object', BigDecimal('0.0001') - # logger.warn 'this is a warning' - # logger.error 'this is an error', BigDecimal('0.0002') - # logger.fatal 'FATAL' - # logger.debug 'score are', @scores + logger.info 'this is an object', BigDecimal('0.0001') + logger.warn 'this is a warning' + logger.error 'this is an error', BigDecimal('0.0002') + logger.fatal 'FATAL' + logger.debug 'scores are', @scores end # GET /scores/1 diff --git a/lib/formatters/basic_formatter.rb b/lib/formatters/basic_formatter.rb index 7176586..6f94faf 100644 --- a/lib/formatters/basic_formatter.rb +++ b/lib/formatters/basic_formatter.rb @@ -7,7 +7,7 @@ require 'amazing_print' class BasicFormatter < SemanticLogger::Formatters::Color NAME_MAX_SIZE = 25 TERMINAL_PREFIX = ENV['TERMINAL_PREFIX'].to_i || 0 - CONTENT_PREFIX = '---'.freeze + CONTENT_PREFIX = ' '.freeze ANSI_DEBUG = "\e[90m".freeze ANSI_INFO = SemanticLogger::AnsiColors::GREEN