aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorR E Broadley <rebroad+github@gmail.com>2012-05-29 17:13:15 +0100
committerR E Broadley <rebroad+github@gmail.com>2012-06-27 23:42:22 +0100
commit7f1de3fec895bfcfcc67ce69be8dc4ad721ca6d5 (patch)
tree664f3e610ca83b68d274b32fe87d9179dd2b0cda /src/init.cpp
parente75acc006e8bc5c44d1d6e6c3b027fe28d8c743b (diff)
downloadbitcoin-7f1de3fec895bfcfcc67ce69be8dc4ad721ca6d5.tar.xz
Make truncating the debug.log file an option.
Useful for developers who need to refer to futher back in debug.log history, but who don't want to enable the -debug option and all the verbosity that comes with that.
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index bb93342631..d06664c29a 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -260,6 +260,7 @@ std::string HelpMessage()
" -debug " + _("Output extra debugging information. Implies all other -debug* options") + "\n" +
" -debugnet " + _("Output extra network debugging information") + "\n" +
" -logtimestamps " + _("Prepend debug output with timestamp") + "\n" +
+ " -shrinkdebugfile " + _("Shrink debug.log file on client startup (default: 1 when no -debug)") + "\n" +
" -printtoconsole " + _("Send trace/debug info to console instead of debug.log file") + "\n" +
#ifdef WIN32
" -printtodebugger " + _("Send trace/debug info to debugger") + "\n" +
@@ -443,7 +444,7 @@ bool AppInit2()
}
#endif
- if (!fDebug)
+ if (GetBoolArg("-shrinkdebugfile", !fDebug))
ShrinkDebugFile();
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
printf("Bitcoin version %s (%s)\n", FormatFullVersion().c_str(), CLIENT_DATE.c_str());