mirror of
https://github.com/GOSTSec/sgminer
synced 2025-08-26 22:02:09 +00:00
Add debug-log documentation and enable it by default
This commit is contained in:
parent
f3336dcf88
commit
2d66c44b42
@ -419,10 +419,9 @@ file and any changes that may have been made.
|
||||
|
||||
sgminer will log to stderr if it detects stderr is being redirected to a
|
||||
file. To enable logging simply append `2>logfile.txt` to your command line
|
||||
and `logfile.txt` will contain the logged output at the log level you
|
||||
specify (normal, verbose, debug etc.). If you use the `--debug-log` option
|
||||
then everything will be logged to the file (console output will remain as
|
||||
configured).
|
||||
and `logfile.txt` will contain all debug output unless you set `debug-log`
|
||||
to `false`, in which case it will only contain output at the log level you
|
||||
specified (notice by default).
|
||||
|
||||
There is also the -m option on Linux which will spawn a command of your choice
|
||||
and pipe the output directly to that command.
|
||||
|
@ -456,6 +456,7 @@ sgminer 4.2.1-116-g2e8b-dirty
|
||||
* [Miscellaneous Options](#miscellaneous-options)
|
||||
* [compact](#compact)
|
||||
* [debug](#debug)
|
||||
* [debug-log](#debug-log)
|
||||
* [default-profile](#default-profile)
|
||||
* [device](#device)
|
||||
* [difficulty-multiplier](#difficulty-multiplier)
|
||||
@ -1793,6 +1794,22 @@ Enable debug output.
|
||||
|
||||
[Top](#configuration-and-command-line-options) :: [Config-file and CLI options](#config-file-and-cli-options) :: [Miscellaneous Options](#miscellaneous-options)
|
||||
|
||||
### debug-log
|
||||
|
||||
Enable debug logging when stderr is redirected to file.
|
||||
|
||||
*Available*: Global
|
||||
|
||||
*Config File Syntax:* `"debug-log":false`
|
||||
|
||||
*Command Line Syntax:* `--debug-log`
|
||||
|
||||
*Argument:* None
|
||||
|
||||
*Default:* `true`
|
||||
|
||||
[Top](#configuration-and-command-line-options) :: [Config-file and CLI options](#config-file-and-cli-options) :: [Miscellaneous Options](#miscellaneous-options)
|
||||
|
||||
### default-profile
|
||||
|
||||
Use this profile for sgminer's default settings.
|
||||
|
@ -8202,6 +8202,9 @@ int main(int argc, char *argv[])
|
||||
sigaction(SIGINT, &handler, &inthandler);
|
||||
#endif
|
||||
|
||||
/* enable debug output to file by default is stderr is redirected to a file */
|
||||
opt_debug = !isatty(fileno((FILE *)stderr));
|
||||
|
||||
/* opt_kernel_path defaults to SGMINER_PREFIX */
|
||||
opt_kernel_path = (char *)alloca(PATH_MAX);
|
||||
strcpy(opt_kernel_path, SGMINER_PREFIX);
|
||||
|
Loading…
x
Reference in New Issue
Block a user