I have added basic infrastructure in
org.eclipse.equinox.p2.core for using DebugOptions. If you find yourself
needing to add extra "println" statements for debugging purposes,
consider whether that extra debugging info might come in handy when p2
is in the field. To add more tracing, just add an extra DEBUG_* field to
the Tracing class, and add the option key to the .options file, turned
off by default, with a brief description of what the tracing does. All
debug statements should be controlled with their own specific flag rather
than just Tracing.DEBUG, to allow fine-tuning of the trace output. We should
have no "System.out.println" or "Throwable.printStackTrace()"
statements in our code that aren't controlled by a debug option. For exceptions,
it's usually better to log than to use a trace option.
While I'm at it, a quick reminder to
those who are tempted to add more code like this: