Class BuildLog
Most of the [vManager Charts] build-console lines (REST URLs,
payloads, response statuses, per-session listings, summary printfs, etc.)
are only useful when diagnosing an issue. By default the plugin should be
quiet: only WARNING / error lines should appear in a job's console output.
This helper exposes a thread-local "verbose" flag that
CustomMetricsRunListener
sets at the start of each build (from
VManagerChartsJobProperty.isVerboseLogging())
and clears in a finally block. Any code reachable from
onCompleted can call trace(TaskListener, String) to emit
a line that is suppressed when verbose is off.
WARNING and error lines should be printed directly via
listener.getLogger().println(...) — they always appear regardless
of the verbose flag.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()Clears the verbose flag for the current thread (call in finally).static booleanWhether verbose console output is currently enabled.static voidsetVerbose(boolean verbose) Sets the verbose flag for the current thread.static voidtrace(TaskListener listener, String msg) Printsmsgto the build's console only when the verbose flag is enabled and the listener is non-null.
-
Method Details
-
setVerbose
public static void setVerbose(boolean verbose) Sets the verbose flag for the current thread. -
clear
public static void clear()Clears the verbose flag for the current thread (call in finally). -
isVerbose
public static boolean isVerbose()Whether verbose console output is currently enabled. -
trace
Printsmsgto the build's console only when the verbose flag is enabled and the listener is non-null. Use this for chatty diagnostic lines (REST URLs, payloads, per-row summaries, etc.).
-