Minor trace logging improvements.
Make all trace environment variable strings upper case and prefix with KICAD_TRACE_ for consistency. Add Doxygen group for the trace environment variable strings.
This commit is contained in:
parent
8722fd9c6c
commit
cb764d73c5
|
@ -55,7 +55,7 @@ static const unsigned char dummy_png[] = {
|
|||
|
||||
static const BITMAP_OPAQUE dummy_xpm[1] = {{ dummy_png, sizeof( dummy_png ), "dummy_xpm" }};
|
||||
|
||||
const wxString traceFindReplace( wxT( "KicadFindReplace" ) );
|
||||
const wxString traceFindReplace = "KICAD_TRACE_FIND_REPLACE";
|
||||
|
||||
|
||||
enum textbox {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2013-2015 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
#define URL_GET_INVOLVED "http://kicad-pcb.org/contribute/"
|
||||
|
||||
const wxChar traceAutoSave[] = wxT( "KicadAutoSave" );
|
||||
const wxChar traceAutoSave[] = wxT( "KICAD_TRACE_AUTOSAVE" );
|
||||
|
||||
///@{
|
||||
/// \ingroup config
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr
|
||||
* Copyright (C) 2007-2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2007 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -65,12 +65,11 @@ static const int CURSOR_SIZE = 12; ///< Cursor size in pixels
|
|||
|
||||
|
||||
/**
|
||||
* Trace mask used to enable or disable the trace output of coordinates during drawing
|
||||
* functions. The coordinate dumping can be turned on by setting the WXTRACE environment
|
||||
* variable to "kicad_dump_coords". See the wxWidgets documentation on wxLogTrace for
|
||||
* more information.
|
||||
* @ingroup trace_env_vars
|
||||
*
|
||||
* Flag to enable draw panel coordinate debug tracing.
|
||||
*/
|
||||
#define KICAD_TRACE_COORDS wxT( "kicad_dump_coords" )
|
||||
static const wxString kicadTraceCoords = wxT( "KICAD_TRACE_COORDS" );
|
||||
|
||||
|
||||
// Events used by EDA_DRAW_PANEL
|
||||
|
@ -314,7 +313,7 @@ void EDA_DRAW_PANEL::RefreshDrawingRect( const EDA_RECT& aRect, bool aEraseBackg
|
|||
rect.width = dc.LogicalToDeviceXRel( rect.width );
|
||||
rect.height = dc.LogicalToDeviceYRel( rect.height );
|
||||
|
||||
wxLogTrace( KICAD_TRACE_COORDS,
|
||||
wxLogTrace( kicadTraceCoords,
|
||||
wxT( "Refresh area: drawing (%d, %d, %d, %d), device (%d, %d, %d, %d)" ),
|
||||
aRect.GetX(), aRect.GetY(), aRect.GetWidth(), aRect.GetHeight(),
|
||||
rect.x, rect.y, rect.width, rect.height );
|
||||
|
@ -371,7 +370,7 @@ void EDA_DRAW_PANEL::MoveCursor( const wxPoint& aPosition )
|
|||
GetScrollPixelsPerUnit( &xPpu, &yPpu );
|
||||
CalcUnscrolledPosition( screenPos.x, screenPos.y, &drawingPos.x, &drawingPos.y );
|
||||
|
||||
wxLogTrace( KICAD_TRACE_COORDS,
|
||||
wxLogTrace( kicadTraceCoords,
|
||||
wxT( "MoveCursor() initial screen position(%d, %d) " ) \
|
||||
wxT( "rectangle(%d, %d, %d, %d) view(%d, %d)" ),
|
||||
screenPos.x, screenPos.y, clientRect.x, clientRect.y,
|
||||
|
@ -389,7 +388,7 @@ void EDA_DRAW_PANEL::MoveCursor( const wxPoint& aPosition )
|
|||
Scroll( x, y );
|
||||
CalcScrolledPosition( drawingPos.x, drawingPos.y, &screenPos.x, &screenPos.y );
|
||||
|
||||
wxLogTrace( KICAD_TRACE_COORDS,
|
||||
wxLogTrace( kicadTraceCoords,
|
||||
wxT( "MoveCursor() scrolled screen position(%d, %d) view(%d, %d)" ),
|
||||
screenPos.x, screenPos.y, x, y );
|
||||
}
|
||||
|
@ -488,7 +487,7 @@ void EDA_DRAW_PANEL::OnScroll( wxScrollWinEvent& event )
|
|||
return;
|
||||
}
|
||||
|
||||
wxLogTrace( KICAD_TRACE_COORDS,
|
||||
wxLogTrace( kicadTraceCoords,
|
||||
wxT( "Setting scroll bars ppuX=%d, ppuY=%d, unitsX=%d, unitsY=%d, posX=%d, posY=%d" ),
|
||||
ppux, ppuy, unitsX, unitsY, x, y );
|
||||
|
||||
|
@ -544,7 +543,7 @@ void EDA_DRAW_PANEL::SetClipBox( wxDC& aDC, const wxRect* aRect )
|
|||
m_ClipBox.SetSize( wxSize( aDC.DeviceToLogicalXRel( clipBox.width ),
|
||||
aDC.DeviceToLogicalYRel( clipBox.height ) ) );
|
||||
|
||||
wxLogTrace( KICAD_TRACE_COORDS,
|
||||
wxLogTrace( kicadTraceCoords,
|
||||
wxT( "Device clip box=(%d, %d, %d, %d), Logical clip box=(%d, %d, %d, %d)" ),
|
||||
clipBox.x, clipBox.y, clipBox.width, clipBox.height,
|
||||
m_ClipBox.GetX(), m_ClipBox.GetY(), m_ClipBox.GetWidth(), m_ClipBox.GetHeight() );
|
||||
|
@ -638,7 +637,7 @@ void EDA_DRAW_PANEL::ReDraw( wxDC* DC, bool erasebg )
|
|||
|
||||
// Verfies that the clipping is working correctly. If these two sets of numbers are
|
||||
// not the same or really close. The clipping algorithms are broken.
|
||||
wxLogTrace( KICAD_TRACE_COORDS,
|
||||
wxLogTrace( kicadTraceCoords,
|
||||
wxT( "Clip box: (%d, %d, %d, %d), Draw extents (%d, %d, %d, %d)" ),
|
||||
m_ClipBox.GetX(), m_ClipBox.GetY(), m_ClipBox.GetRight(), m_ClipBox.GetBottom(),
|
||||
DC->MinX(), DC->MinY(), DC->MaxX(), DC->MaxY() );
|
||||
|
@ -958,7 +957,7 @@ void EDA_DRAW_PANEL::OnMouseWheel( wxMouseEvent& event )
|
|||
if( event.GetWheelRotation() == 0 || !GetParent()->IsEnabled()
|
||||
|| !rect.Contains( event.GetPosition() ) )
|
||||
{
|
||||
wxLogTrace( KICAD_TRACE_COORDS,
|
||||
wxLogTrace( kicadTraceCoords,
|
||||
wxT( "OnMouseWheel() position(%d, %d) rectangle(%d, %d, %d, %d)" ),
|
||||
event.GetPosition().x, event.GetPosition().y,
|
||||
rect.x, rect.y, rect.width, rect.height );
|
||||
|
@ -1422,7 +1421,7 @@ void EDA_DRAW_PANEL::OnPan( wxCommandEvent& event )
|
|||
unitsX /= ppux;
|
||||
unitsY /= ppuy;
|
||||
|
||||
wxLogTrace( KICAD_TRACE_COORDS,
|
||||
wxLogTrace( kicadTraceCoords,
|
||||
wxT( "Scroll center position before pan: (%d, %d)" ), tmpX, tmpY );
|
||||
|
||||
switch( event.GetId() )
|
||||
|
@ -1483,7 +1482,7 @@ void EDA_DRAW_PANEL::OnPan( wxCommandEvent& event )
|
|||
center.y += KiROUND( (double) ( y - tmpY ) / scale );
|
||||
GetParent()->SetScrollCenterPosition( center );
|
||||
|
||||
wxLogTrace( KICAD_TRACE_COORDS,
|
||||
wxLogTrace( kicadTraceCoords,
|
||||
wxT( "Scroll center position after pan: (%d, %d)" ), center.x, center.y );
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2004-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2008-2017 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2004-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -60,7 +60,7 @@ int LIB_PART::m_subpartIdSeparator = 0;
|
|||
int LIB_PART::m_subpartFirstId = 'A';
|
||||
|
||||
|
||||
const wxChar traceSchLibMem[] = wxT( "KISCHLIBMEM" ); // public
|
||||
const wxChar traceSchLibMem[] = wxT( "KICAD_TRACE_SCH_LIB_MEM" ); // public
|
||||
|
||||
|
||||
LIB_ALIAS::LIB_ALIAS( const wxString& aName, LIB_PART* aRootPart ):
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2004-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2008-2017 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2004-2017 KiCad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -61,7 +61,11 @@ enum LIBRENTRYOPTIONS
|
|||
};
|
||||
|
||||
|
||||
/// WXTRACE value to enable schematic library memory deletion debug output.
|
||||
/**
|
||||
* @ingroup trace_env_vars
|
||||
*
|
||||
* Flag to enable schematic library memory deletion debug output.
|
||||
*/
|
||||
extern const wxChar traceSchLibMem[];
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -38,7 +38,7 @@
|
|||
#include <general.h>
|
||||
|
||||
|
||||
const wxString traceFindItem( wxT( "KicadFindItem" ) );
|
||||
const wxString traceFindItem = wxT( "KICAD_TRACE_FIND_ITEM" );
|
||||
|
||||
|
||||
bool sort_schematic_items( const SCH_ITEM* aItem1, const SCH_ITEM* aItem2 )
|
||||
|
|
|
@ -55,8 +55,13 @@ typedef std::vector< SCH_ITEMS_ITR > SCH_ITEMS_ITRS;
|
|||
#define FMT_ANGLE SCH_ITEM::FormatAngle
|
||||
|
||||
|
||||
/// Flag to enable find item tracing using the WXTRACE environment variable. This
|
||||
/// flag generates a lot of debug output.
|
||||
/**
|
||||
* @ingroup trace_env_vars
|
||||
*
|
||||
* Flag to enable finding schematic item debug output.
|
||||
*
|
||||
* @warning This generates a log of debug output.
|
||||
*/
|
||||
extern const wxString traceFindItem;
|
||||
|
||||
|
||||
|
|
|
@ -72,7 +72,12 @@
|
|||
const char* delims = " \t\r\n";
|
||||
|
||||
|
||||
const wxChar traceSchLegacyPlugin[] = wxT( "KI_SCH_LEGACY_PLUGIN" );
|
||||
/**
|
||||
* @ingroup trace_env_vars
|
||||
*
|
||||
* Flag to enable legacy schematic plugin debug output.
|
||||
*/
|
||||
const wxChar traceSchLegacyPlugin[] = wxT( "KICAD_TRACE_SCH_LEGACY_PLUGIN" );
|
||||
|
||||
|
||||
static bool is_eol( char c )
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2013-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2008-2015 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 2008-2017 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2004-2017 KiCad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -45,7 +45,21 @@ extern std::ostream& operator <<( std::ostream& out, const wxPoint& pt );
|
|||
#endif
|
||||
|
||||
|
||||
/// Flag to enable find and replace tracing using the WXTRACE environment variable.
|
||||
/**
|
||||
* @defgroup trace_env_vars Trace Environment Variables
|
||||
*
|
||||
* wxWidgets provides trace control of debug messages using the WXTRACE environment variable.
|
||||
* This section defines the strings passed to WXTRACE to for debug output control of various
|
||||
* sections of the KiCad code. See the wxWidgets <a href="http://docs.wxwidgets.org/3.0/
|
||||
* group__group__funcmacro__log.html#ga947e317db477914c12b13c4534867ec9"> wxLogTrace </a>
|
||||
* documentation for more information.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup trace_env_vars
|
||||
*
|
||||
* Flag to enable find and replace debug tracing.
|
||||
*/
|
||||
extern const wxString traceFindReplace;
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009-2015 Jean-Pierre Charras, jp.charras wanadoo.fr
|
||||
* Copyright (C) 2011-2017 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -95,7 +95,11 @@ enum id_librarytype {
|
|||
};
|
||||
|
||||
|
||||
/// Custom trace mask to enable and disable auto save tracing.
|
||||
/**
|
||||
* @ingroup trace_env_vars
|
||||
*
|
||||
* Flag to enable auto save feature debug tracing.
|
||||
*/
|
||||
extern const wxChar traceAutoSave[];
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2012-2017 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -48,10 +48,11 @@
|
|||
#include <memory.h>
|
||||
|
||||
/**
|
||||
* Definition for enabling and disabling footprint library trace output. See the
|
||||
* wxWidgets documentation on using the WXTRACE environment variable.
|
||||
* @ingroup trace_env_vars
|
||||
*
|
||||
* Flag to enable GEDA PCB plugin debug output.
|
||||
*/
|
||||
static const wxString traceFootprintLibrary( wxT( "GedaPcbFootprintLib" ) );
|
||||
static const wxString traceFootprintLibrary = wxT( "KICAD_TRACE_GEDA_PLUGIN" );
|
||||
|
||||
#ifdef DEBUG
|
||||
static void inline traceParams( wxArrayString& aParams )
|
||||
|
|
|
@ -56,10 +56,12 @@ using namespace PCB_KEYS_T;
|
|||
#define FMTIU BOARD_ITEM::FormatInternalUnits
|
||||
|
||||
/**
|
||||
* Definition for enabling and disabling footprint library trace output. See the
|
||||
* wxWidgets documentation on using the WXTRACE environment variable.
|
||||
* @ingroup trace_env_vars
|
||||
*
|
||||
* Flag to enable KiCad PCB plugin debug output.
|
||||
*/
|
||||
static const wxString traceFootprintLibrary( wxT( "KicadFootprintLib" ) );
|
||||
static const wxString traceFootprintLibrary = wxT( "KICAD_TRACE_FP_PLUGIN" );
|
||||
|
||||
|
||||
///> Removes empty nets (i.e. with node count equal zero) from net classes
|
||||
void filterNetClass( const BOARD& aBoard, NETCLASS& aNetClass )
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -45,10 +45,11 @@
|
|||
|
||||
|
||||
/**
|
||||
* Definition for enabling and disabling print controller trace output. See the
|
||||
* wxWidgets documentation on using the WXTRACE environment variable.
|
||||
* @ingroup trace_env_vars
|
||||
*
|
||||
* Flag to enable PCB print controller debug output.
|
||||
*/
|
||||
static const wxString tracePrinting( wxT( "KicadPrinting" ) );
|
||||
static const wxString tracePrinting = wxT( "KICAD_TRACE_PCB_PRINT" );
|
||||
|
||||
|
||||
PRINT_PARAMETERS::PRINT_PARAMETERS()
|
||||
|
|
Loading…
Reference in New Issue