diff --git a/hledger-ui/hledger-ui.m4.md b/hledger-ui/hledger-ui.m4.md index a78e8f11a..b559f9d15 100644 --- a/hledger-ui/hledger-ui.m4.md +++ b/hledger-ui/hledger-ui.m4.md @@ -355,6 +355,11 @@ CPU and memory usage can sometimes gradually increase, if `hledger-ui --watch` i To work around, `q`uit and restart it, or (where supported) suspend (`CTRL-z`) and restart it (`fg`). +## Debug output + +You can add `--debug[=N]` to the command line to log debug output. +This will be logged to the file `hledger-ui.log` in the current directory. +N ranges from 1 (least output, the default) to 9 (maximum output). # ENVIRONMENT diff --git a/hledger-web/hledger-web.m4.md b/hledger-web/hledger-web.m4.md index 946eee9a6..c4fd05ad3 100644 --- a/hledger-web/hledger-web.m4.md +++ b/hledger-web/hledger-web.m4.md @@ -401,6 +401,17 @@ And here's how to test adding it with curl. This should add a new entry to your $ curl http://127.0.0.1:5000/add -X PUT -H 'Content-Type: application/json' --data-binary @txn.json ``` +# DEBUG OUTPUT + +## Debug output + +You can add `--debug[=N]` to the command line to log debug output. +N ranges from 1 (least output, the default) to 9 (maximum output). +Typically you would start with 1 and increase until you are seeing enough. +Debug output goes to stderr, interleaved with the requests logged on stdout. +To capture debug output in a log file instead, you can usually redirect stderr, eg:\ +`hledger-web --debug=3 2>hledger-web.log`. + # ENVIRONMENT _LEDGER_FILE_