<p><code>LogPrint</code> and <code>LogPrintf</code> are very similar.</p>

<p>Mind the definiton: <code>#define LogPrintf(...) LogPrint(NULL, __VA_ARGS__)</code></p>

<p><code>LogPrint</code>'s will only end up in your <code>debug.log</code> when enabling the corresponding category. Enabling works over the <code>-debug</code> arg.</p>

<p><code>-debug=mempool,net</code> would output all <code>LogPrint("mempool",...)</code> or <code>LogPrint("net",...)</code> to the debug log, or to stdout if <code>-printtoconsole</code> has been enabled.</p>

CC BY-SA 3.0
2015-10-26T08:22:37.717Z
2015-10-26T08:22:37.717Z
Jonas Schnelli
<p>Where can I check the output logs generated from <code>LogPrint()</code> statements in the <code>bitcoind</code> source code.</p>

<p>PS: Please do not confuse this with the <code>LogPrintf()</code> statement, which logs the output into <code>debug.log</code> file.</p>

CC BY-SA 3.0
2015-10-24T19:53:59.003Z
Have you set the right `-debug` option in your bitcoin.conf?
Nick ODell
<bitcoind><logging>
LogPrint() output location?
bawejakunal
# LogPrint() output location?

(Asked by: username_0 on 2015-10-24)

Where can I check the output logs generated from `LogPrint()` statements in the `bitcoind` source code.

PS: Please do not confuse this with the `LogPrintf()` statement, which logs the output into `debug.log` file.

**Tags:** bitcoind, logging

> **Comments:**
> **username_1**: Have you set the right `-debug` option in your bitcoin.conf?  

---

## 1 answers

### Answer by username_2 on 2015-10-26. Score: 6 | Accepted answer

`LogPrint` and `LogPrintf` are very similar.

Mind the definiton: `#define LogPrintf(...) LogPrint(NULL, __VA_ARGS__)`

`LogPrint`'s will only end up in your `debug.log` when enabling the corresponding category. Enabling works over the `-debug` arg.

`-debug=mempool,net` would output all `LogPrint("mempool",...)` or `LogPrint("net",...)` to the debug log, or to stdout if `-printtoconsole` has been enabled.


---

