diff options
Diffstat (limited to 'src/main_gui.cpp')
| -rw-r--r-- | src/main_gui.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 211e1e2..05f5ecf 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp | |||
| @@ -111,6 +111,7 @@ static void PrintUsage() | |||
| 111 | printf(" /help, -help, --help, /?\n"); | 111 | printf(" /help, -help, --help, /?\n"); |
| 112 | printf(" /datadir=PATH\n"); | 112 | printf(" /datadir=PATH\n"); |
| 113 | printf(" /debug\n"); | 113 | printf(" /debug\n"); |
| 114 | printf(" /maxdebugfilesize=N (roll debug.log at N MB, default 1024; 0 = never)\n"); | ||
| 114 | printf(" /gen\n"); | 115 | printf(" /gen\n"); |
| 115 | printf(" /nogui or /daemon\n"); | 116 | printf(" /nogui or /daemon\n"); |
| 116 | printf(" /selftest=wallet-keypool, wallet-hd, wallet-format, wallet-crypto, wallet-encrypt,\n"); | 117 | printf(" /selftest=wallet-keypool, wallet-hd, wallet-format, wallet-crypto, wallet-encrypt,\n"); |
| @@ -191,6 +192,20 @@ static void ParseStartupArguments(int argc, char* argv[]) | |||
| 191 | if (arg(argc,argv,"/debug") || arg(argc,argv,"-debug")) | 192 | if (arg(argc,argv,"/debug") || arg(argc,argv,"-debug")) |
| 192 | fDebug = true; | 193 | fDebug = true; |
| 193 | 194 | ||
| 195 | // /maxdebugfilesize=N -- roll debug.log to debug.log.old once it passes | ||
| 196 | // N MB, checked on each write. Default is 1024 (see util.cpp); 0 turns | ||
| 197 | // the check off and leaves rotation entirely to logrotate. | ||
| 198 | string strMaxDebugSize = argval2(argc, argv, "/maxdebugfilesize", "-maxdebugfilesize"); | ||
| 199 | if (!strMaxDebugSize.empty()) | ||
| 200 | { | ||
| 201 | int64 nMB = atoi64(strMaxDebugSize.c_str()); | ||
| 202 | if (nMB < 0) | ||
| 203 | fprintf(stderr, "Ignoring /maxdebugfilesize=%s: not a size in MB\n", | ||
| 204 | strMaxDebugSize.c_str()); | ||
| 205 | else | ||
| 206 | nMaxDebugFileSize = nMB * 1024 * 1024; | ||
| 207 | } | ||
| 208 | |||
| 194 | if (arg(argc,argv,"/gen") || arg(argc,argv,"-gen")) | 209 | if (arg(argc,argv,"/gen") || arg(argc,argv,"-gen")) |
| 195 | { | 210 | { |
| 196 | fGenerateBitcoins = 1; | 211 | fGenerateBitcoins = 1; |