mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Re-enable logger after catching exit
The logger is closed during at-exit hooks that get invoked by Kernel's exit method.
This commit is contained in:
parent
60b5f151f1
commit
e2cdc9e08e
2 changed files with 4 additions and 0 deletions
|
@ -20,6 +20,9 @@ class Process
|
|||
# Replace the typically used exit method with a method that raises.
|
||||
# This allows tests to catch attempts to exit the application.
|
||||
def self.exit(status = 0) : NoReturn
|
||||
# Re-enable log that is disabled from at-exit handlers.
|
||||
::Log.setup_from_env(default_level: :none)
|
||||
|
||||
raise ::Spectator::SystemExit.new(status: status)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue