Package org.rossonet.ext.picocli
Class CommandLine.Tracer
- java.lang.Object
-
- org.rossonet.ext.picocli.CommandLine.Tracer
-
- Enclosing class:
- CommandLine
public static final class CommandLine.Tracer extends java.lang.ObjectUtility class for printing internal debug statements.- Since:
- 4.7.6-SNAPSHOT
- See Also:
CommandLine.tracer()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebug(java.lang.String msg, java.lang.Object... params)Prints the specified message if the current trace level is DEBUG or higher.CommandLine.TraceLevelgetLevel()Returns the trace level that needs to be matched or exceeded for internal tracing statements to be printed.voidinfo(java.lang.String msg, java.lang.Object... params)Prints the specified message if the current trace level is INFO or higher.booleanisDebug()Returns whether the current trace level is DEBUG (the highest).booleanisInfo()Returns whether the current trace level is INFO or higher.booleanisOff()Returns whether the current trace level is OFF (the lowest).booleanisWarn()Returns whether the current trace level is WARN or higher.voidsetLevel(CommandLine.TraceLevel level)Sets the trace level that needs to be matched or exceeded for internal tracing statements to be printed.java.lang.StringtoString()voidwarn(java.lang.String msg, java.lang.Object... params)Prints the specified message if the current trace level is WARN or higher.
-
-
-
Method Detail
-
debug
public void debug(java.lang.String msg, java.lang.Object... params)Prints the specified message if the current trace level is DEBUG or higher.- Parameters:
msg- the message to print; may useString.format(String, Object...)syntaxparams- Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero.- See Also:
Formatter
-
getLevel
public CommandLine.TraceLevel getLevel()
Returns the trace level that needs to be matched or exceeded for internal tracing statements to be printed. The initial trace level is WARN, unless system property"picocli.trace"is set to another validTraceLevelvalue.- Returns:
- the trace level that needs to be matched or exceeded for tracing statements to be printed
-
info
public void info(java.lang.String msg, java.lang.Object... params)Prints the specified message if the current trace level is INFO or higher.- Parameters:
msg- the message to print; may useString.format(String, Object...)syntaxparams- Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero.- See Also:
Formatter
-
isDebug
public boolean isDebug()
Returns whether the current trace level is DEBUG (the highest).
-
isInfo
public boolean isInfo()
Returns whether the current trace level is INFO or higher.
-
isOff
public boolean isOff()
Returns whether the current trace level is OFF (the lowest).
-
isWarn
public boolean isWarn()
Returns whether the current trace level is WARN or higher.
-
setLevel
public void setLevel(CommandLine.TraceLevel level)
Sets the trace level that needs to be matched or exceeded for internal tracing statements to be printed. The initial trace level is WARN, unless system property"picocli.trace"is set to another validTraceLevelvalue.- Parameters:
level- the trace level that needs to be matched or exceeded for tracing statements to be printed
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
warn
public void warn(java.lang.String msg, java.lang.Object... params)Prints the specified message if the current trace level is WARN or higher.- Parameters:
msg- the message to print; may useString.format(String, Object...)syntaxparams- Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero.- See Also:
Formatter
-
-