Skip to content

Commit

Permalink
fix(Log): use Log#setup
Browse files Browse the repository at this point in the history
  • Loading branch information
caspiano committed Jun 17, 2020
1 parent e0558ae commit 2f66d3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.cr
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ ActionController::Server.before(

# Configure logging
log_level = PROD ? Log::Severity::Info : Log::Severity::Debug
Log.builder.bind "*", log_level, PlaceOS::Frontends::LOG_BACKEND
::Log.setup "*", log_level, PlaceOS::Frontends::LOG_BACKEND

# Allow signals to change the log level at run-time
logging = Proc(Signal, Nil).new do |signal|
level = signal.usr1? ? Log::Severity::Debug : Log::Severity::Info
puts " > Log level changed to #{level}"
Log.builder.bind "frontends.*", level, PlaceOS::Frontends::LOG_BACKEND
::Log.for("frontends.*").level = level
signal.ignore
end

Expand Down

0 comments on commit 2f66d3f

Please sign in to comment.