Skip to content

Commit

Permalink
Improve Console logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed May 8, 2024
1 parent 34c00c2 commit 103b9cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/falcon
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ begin
rescue Interrupt
# Ignore.
rescue => error
Console.logger.error(Falcon::Command) {error}
Console.error(Falcon::Command, error)
exit! 1
end
6 changes: 3 additions & 3 deletions lib/falcon/middleware/proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ def call(request)
else
super
end
rescue
Console.logger.error(self) {$!}
return Protocol::HTTP::Response[502, {'content-type' => 'text/plain'}, ["#{$!.inspect}: #{$!.backtrace.join("\n")}"]]
rescue => error
Console.error(self, error)
return Protocol::HTTP::Response[502, {'content-type' => 'text/plain'}, [error.class.name]]
end
end
end
Expand Down

0 comments on commit 103b9cc

Please sign in to comment.