Tags:
create new tag
view all tags

Suggestion

I had to read the debug information (written by TWiki in debug file) (TWiki version: Dec 2001) for some problems with RCS, and thereby noticed that the choice to log debug or not is let to the caller.

I changed some files to have it done inversely:

  1. caller always calls writeDebug (i.e. is not commented out)
  2. added a global variable in TWiki.cfg, $debugActive, that can be globally set to 1 so as to activate debug logging.
  3. changed the sub writeDebug (here from Store.pm, should be done in TWiki.pm)

sub writeDebug
{
   return unless $TWiki::debugActive;
   TWiki::writeDebug( "Store: $_[0]" );
}

Shouldn't this be integrated in released versions? I personnaly would appreciate it, but am rather new to TWiki and have still a limited overview on the whole system.

I can see 2 ways to improve this:

  1. with a debug level
  2. with a target selection (e.g. 0x1 means Store, 0x2 Search, ...)

-- JeanMarieClement - 08 Apr 2002

Comments

This sort of thing has come up before. It can get pretty complicated, so we really use the simplest system that does what we need. In many cases we comment out a lot of the debug code for performance reasons, this would be hard to deal with in a generic way. I've marked this as a FeatureNotSuitable because it would need more substance to get implemented.

-- JohnTalintyre - 09 Apr 2002

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2002-04-09 - JohnTalintyre
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.