mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-09 15:18:03 +02:00
Fix compatibility with -debuglogfile command-line option
This change avoids hardcoding the "debug.log" filename, ensuring compatibility with custom filenames provided via the `-debuglogfile` command-line option.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <logging.h>
|
||||
#include <node/interface_ui.h>
|
||||
#include <node/warnings.h>
|
||||
#include <util/fs.h>
|
||||
#include <util/signalinterrupt.h>
|
||||
#include <util/translation.h>
|
||||
|
||||
@@ -18,7 +19,7 @@ namespace node {
|
||||
void AbortNode(const std::function<bool()>& shutdown_request, std::atomic<int>& exit_status, const bilingual_str& message, node::Warnings* warnings)
|
||||
{
|
||||
if (warnings) warnings->Set(Warning::FATAL_INTERNAL_ERROR, message);
|
||||
InitError(_("A fatal internal error occurred, see debug.log for details: ") + message);
|
||||
InitError(strprintf(_("A fatal internal error occurred, see %s for details: %s"), fs::PathToString(LogInstance().m_file_path.filename()), message));
|
||||
exit_status.store(EXIT_FAILURE);
|
||||
if (shutdown_request && !shutdown_request()) {
|
||||
LogError("Failed to send shutdown signal\n");
|
||||
|
||||
Reference in New Issue
Block a user