Bitcoin Forum
May 12, 2024, 11:29:47 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [Pull] Rework debug logging  (Read 1067 times)
Jim Hyslop (OP)
Member
**
Offline Offline

Activity: 98
Merit: 20


View Profile
April 06, 2011, 12:45:25 AM
 #1

Following sipa's example here Smiley

The pull request for revamped debug logging has been open for a few weeks now, with very little discussion on it. I'd like to have some discussion here, in the hopes of having it pulled.

The Problem
The debug log file can grow very quickly. If you are looking for something in particular while debugging, you have to sift through hundreds of lines of debug output that do not apply to the problem at hand.

The Patch
The patch introduces a new function, OutputLogMessageF. This function contains the functionality in the existing OutputDebugStringF. OutputLogMessageF adds two new parameters:

- a value indicating the context of the message (such as transactions, IRC, etc.)
- the severity of the message (error, warning, info, etc.)

The existing OutputDebugStringF function forwards its call to OutputLogMessageF, using parameters to indicate All contexts, severity Warning.

Several functions have been added to support command-line configuration of logging.

Compatibility
Existing code does not have to change in order to use the logging. It can be migrated from the existing 'printf' macro to the function call as developers work on a particular section of code.


Like my answer? Did I help? Tips gratefully accepted here: 1H6wM8Xj8GNrhqWBrnDugd8Vf3nAfZgMnq
1715556587
Hero Member
*
Offline Offline

Posts: 1715556587

View Profile Personal Message (Offline)

Ignore
1715556587
Reply with quote  #2

1715556587
Report to moderator
1715556587
Hero Member
*
Offline Offline

Posts: 1715556587

View Profile Personal Message (Offline)

Ignore
1715556587
Reply with quote  #2

1715556587
Report to moderator
The network tries to produce one block per 10 minutes. It does this by automatically adjusting how difficult it is to produce blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Cryptoman
Hero Member
*****
Offline Offline

Activity: 726
Merit: 500



View Profile
April 06, 2011, 03:13:21 AM
 #2

The Problem
The debug log file can grow very quickly. If you are looking for something in particular while debugging, you have to sift through hundreds of lines of debug output that do not apply to the problem at hand.

Thousands of lines in my case.  This is a welcome addition.

"A small body of determined spirits fired by an unquenchable faith in their mission can alter the course of history." --Gandhi
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!