Skip to content

fix: make sure to flush the logger before halting. #1051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/lambda_ethereum_consensus/beacon/store_setup.ex
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ defmodule LambdaEthereumConsensus.Beacon.StoreSetup do
"[Sync] No recent state found. Please specify the URL to fetch them from via the --checkpoint-sync-url flag"
)

Logger.flush()
System.halt(1)

{_, {store, root}} ->
Expand Down Expand Up @@ -153,6 +154,7 @@ defmodule LambdaEthereumConsensus.Beacon.StoreSetup do
_ ->
Logger.error("[Checkpoint sync] Failed to fetch the latest finalized state and block")

Logger.flush()
System.halt(1)
end
end
Expand All @@ -170,6 +172,8 @@ defmodule LambdaEthereumConsensus.Beacon.StoreSetup do

_ ->
Logger.error("[Checkpoint sync] Failed to fetch the deposit snapshot")

Logger.flush()
System.halt(1)
end
end
Expand Down