Tracing versus Logging and how does log4net fit in?

Logging is the generic term for recording information – tracing is the specific form of logging used to debug. In .NET the System.Diagnostics.Trace and System.Diagnostics.Debug objects allow simple logging to a number of “event listeners” that you can configure in app.config. You can also use TraceSwitches to configure and filter (between errors and info levels, … Read more

Trace Python imports

Start the python interpreter with -v: $ python -v -m /usr/lib/python2.6/timeit.py # installing zipimport hook import zipimport # builtin # installed zipimport hook # /usr/lib/python2.6/site.pyc matches /usr/lib/python2.6/site.py import site # precompiled from /usr/lib/python2.6/site.pyc # /usr/lib/python2.6/os.pyc matches /usr/lib/python2.6/os.py import os # precompiled from /usr/lib/python2.6/os.pyc import errno # builtin import posix # builtin # /usr/lib/python2.6/posixpath.pyc matches /usr/lib/python2.6/posixpath.py … Read more

How to define custom TraceListener in app.config

Try specifying an assembly too, like so: <configuration> <system.diagnostics> <trace autoflush=”true” indentsize=”4″> <listeners> <add name=”TextListener” type=”MyApp.Utils.FormattedTextWriterTraceListener, MyApp” initializeData=”trace.log” /> <remove name=”Default” /> </listeners> </trace> </system.diagnostics> </configuration>