From e276c0a2787a9b9f8cde174d0001884c1d936b24 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Sun, 12 Mar 2017 13:37:23 +0100 Subject: [PATCH] Fix regression introduced in 1afb4cbfa8218ab8616c59a041dcc85fa72834a8 (#331) --- src/kemal.cr | 4 ++-- src/kemal/common_exception_handler.cr | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kemal.cr b/src/kemal.cr index 09a9534..11838c2 100644 --- a/src/kemal.cr +++ b/src/kemal.cr @@ -10,7 +10,7 @@ module Kemal # Overload of self.run with the default startup logging def self.run(port = nil) self.run port do - log "[#{config.env}] Kemal is ready to lead at #{config.scheme}://#{config.host_binding}:#{config.port}\n" + log "[#{config.env}] Kemal is ready to lead at #{config.scheme}://#{config.host_binding}:#{config.port}" end end @@ -42,7 +42,7 @@ module Kemal # Test environment doesn't need to have signal trap, built-in images, and logging. unless config.env == "test" Signal::INT.trap { - log "Kemal is going to take a rest!\n" if config.shutdown_message + log "Kemal is going to take a rest!" if config.shutdown_message Kemal.stop exit } diff --git a/src/kemal/common_exception_handler.cr b/src/kemal/common_exception_handler.cr index 184e1b1..2b9e3b2 100644 --- a/src/kemal/common_exception_handler.cr +++ b/src/kemal/common_exception_handler.cr @@ -12,7 +12,7 @@ module Kemal rescue ex : Kemal::Exceptions::CustomException call_exception_with_status_code(context, ex, context.response.status_code) rescue ex : Exception - log("Exception: #{ex.inspect_with_backtrace}\n") + log("Exception: #{ex.inspect_with_backtrace}") return call_exception_with_status_code(context, ex, 500) if Kemal.config.error_handlers.has_key?(500) verbosity = Kemal.config.env == "production" ? false : true return render_500(context, ex.inspect_with_backtrace, verbosity)