Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: .anto. on January 05, 2016, 11:21:21 PM



Title: Suppressing useless messages from debug.log
Post by: .anto. on January 05, 2016, 11:21:21 PM
I have been running full nodes for quite sometime now. I have added another full node in the last few weeks and I have upgraded the bitcoind to version 0.11.2. Everything is running fine except that I cannot figure out how to suppress the useless messages like below from being inserted into the debug.log file.
Code:
.
2016-01-05 22:51:17 ERROR: AcceptToMemoryPool: nonstandard transaction: dust
2016-01-05 22:51:24 ERROR: AcceptToMemoryPool: free transaction rejected by rate limiter
2016-01-05 22:51:24 ERROR: AcceptToMemoryPool: free transaction rejected by rate limiter
2016-01-05 22:51:31 ERROR: AcceptToMemoryPool: free transaction rejected by rate limiter
2016-01-05 22:51:31 ERROR: AcceptToMemoryPool: nonstandard transaction: dust
2016-01-05 22:51:33 ERROR: AcceptToMemoryPool: free transaction rejected by rate limiter
2016-01-05 22:51:43 ERROR: AcceptToMemoryPool: free transaction rejected by rate limiter
2016-01-05 22:51:48 ERROR: AcceptToMemoryPool: free transaction rejected by rate limiter
.

The bitcoin documentation mention the following options, but I cannot find any more detail information about what each category does and how to set them.
Code:
-debug=<category>   Output debugging information (default: 0, supplying <category> is optional)  
                    If <category> is not supplied, output all debugging information. 
                    <category> can be: addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, net.

Which category is related the above messages? And could I actually use multiple categories, e.g. debug=addrman,bench,coindb, except the category of the above messages?

As the type of the above messages is ERROR message and if I would suppress such messages, would that mean I will not see other ERROR messages that are important?

Thanks in advance for your help.


Title: Re: Suppressing useless messages from debug.log
Post by: achow101 on January 05, 2016, 11:32:08 PM
The category for that message would be mempool. If you don't want it, then I think you will need to specify everything except mempool.


Title: Re: Suppressing useless messages from debug.log
Post by: .anto. on January 05, 2016, 11:37:09 PM
The category for that message would be mempool. If you don't want it, then I think you will need to specify everything except mempool.

Thanks a lot for responding my questions.

How about my second question? If would set the debug not to record any messages of mempool category, does that mean I will not get any other important messages?

And what are the type of messages of mempool category? Is there any documentation about this? Or do we have to dig up the source on https://github.com/bitcoin/bitcoin?


Title: Re: Suppressing useless messages from debug.log
Post by: achow101 on January 06, 2016, 12:10:50 AM
The category for that message would be mempool. If you don't want it, then I think you will need to specify everything except mempool.

Thanks a lot for responding my questions.

How about my second question? If would set the debug not to record any messages of mempool category, does that mean I will not get any other important messages?

And what are the type of messages of mempool category? Is there any documentation about this? Or do we have to dig up the source on https://github.com/bitcoin/bitcoin?
Actually it is not part of mempool. In fact it has no category, it is just Error. I don't think there are docs on this, I had to dig through the source code. And if you could somehow suppress the Error type, then you would be suppressing all of them, including ones that would matter.


Title: Re: Suppressing useless messages from debug.log
Post by: .anto. on January 06, 2016, 12:27:18 AM
Actually it is not part of mempool. In fact it has no category, it is just Error. I don't think there are docs on this, I had to dig through the source code. And if you could somehow suppress the Error type, then you would be suppressing all of them, including ones that would matter.

Thanks for your help.

I have also just been digging up the source (with my limited C programming knowledge), with the hope that I could just remark the commands related to those messages and re-compile bitcoind. But it seems to be more complicated than just remarking them. I guess I have to live with this for a while. It is just an annoying issue anyway.


Title: Re: Suppressing useless messages from debug.log
Post by: SISAR on January 06, 2016, 12:35:27 AM
Just add printtoconsole=1 to bitcoin.conf and enjoy no new data added to debug.log file, there is nothing realy interesting to see there anyway.


Title: Re: Suppressing useless messages from debug.log
Post by: .anto. on January 06, 2016, 12:47:58 AM
Just add printtoconsole=1 to bitcoin.conf and enjoy no new data added to debug.log file, there is nothing realy interesting to see there anyway.

Thanks. But I still need to have the debug.log for figuring out the reasons of any issues on my full nodes, e.g. bitcoind crashes, database corruptions, naughty peers, etc.


Title: Re: Suppressing useless messages from debug.log
Post by: shorena on January 06, 2016, 10:42:08 AM
Just add printtoconsole=1 to bitcoin.conf and enjoy no new data added to debug.log file, there is nothing realy interesting to see there anyway.

Thanks. But I still need to have the debug.log for figuring out the reasons of any issues on my full nodes, e.g. bitcoind crashes, database corruptions, naughty peers, etc.

Accept (or not accept) to mempool messages can be interesting as well. I recently had a node run by "mytrezor" connected to mine. They send >>2k TX every 30 minutes within a few seconds, sometimes close to 4k TX. Since the node is not very powerful and the scripts for the start start on a full minute as well they could not finish in time. Once I knew what was going on I just accepted the gaps in the stats, but without those logs I would probably still wondering what was going on. After the last reboot a few days ago the mytrezor node is no longer connected to mine.

If you want a small .log file I would rather trim it.


Title: Re: Suppressing useless messages from debug.log
Post by: shensu on October 31, 2017, 01:33:25 AM
The category for that message would be mempool. If you don't want it, then I think you will need to specify everything except mempool.

Thanks a lot for responding my questions.

How about my second question? If would set the debug not to record any messages of mempool category, does that mean I will not get any other important messages?

And what are the type of messages of mempool category? Is there any documentation about this? Or do we have to dig up the source on https://github.com/bitcoin/bitcoin?

To answer the question about logging specific categories, they must all be listed on their own line. For example:

Code:
debug=addrman
debug=alert
debug=bench
# ... etc