- java.lang.Object
-
- io.helidon.build.util.Log
-
public abstract class Log extends Object
Simple, centralized logging.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLog.LevelLevels.static interfaceLog.WriterThe log writer.
-
Constructor Summary
Constructors Constructor Description Log()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddebug(String message, Object... args)Log a message at FINE level.static voiderror(String message, Object... args)Log a message at ERROR level.static voiderror(Throwable thrown, String message, Object... args)Log a message at ERROR level with associated throwable.static voidinfo()Log an empty message at INFO level.static voidinfo(String message, Object... args)Log a message at INFO level.static booleanisDebugEnabled()Returns whether or not debug messages will be written.static voidlog(Log.Level level, String message, Object... args)Log the message if at or above the given level.static voidlog(Log.Level level, Throwable thrown, String message, Object... args)Log the message and throwable if at or above the given level.static voidsetWriter(Log.Writer writer)Sets the writer.static voidwarn(String message, Object... args)Log a message at WARNING level.static voidwarn(Throwable thrown, String msg, Object... args)Log a warning message with associated throwable.
-
-
-
Method Detail
-
setWriter
public static void setWriter(Log.Writer writer)
Sets the writer.- Parameters:
writer- The writer.
-
isDebugEnabled
public static boolean isDebugEnabled()
Returns whether or not debug messages will be written.- Returns:
trueif enabled.
-
debug
public static void debug(String message, Object... args)
Log a message at FINE level.- Parameters:
message- The message.args- The message args.
-
info
public static void info()
Log an empty message at INFO level.
-
info
public static void info(String message, Object... args)
Log a message at INFO level.- Parameters:
message- The message.args- The message args.
-
warn
public static void warn(String message, Object... args)
Log a message at WARNING level.- Parameters:
message- The message.args- The message args.
-
warn
public static void warn(Throwable thrown, String msg, Object... args)
Log a warning message with associated throwable.- Parameters:
thrown- The throwable.msg- Message to be logged.args- Format string arguments.
-
error
public static void error(String message, Object... args)
Log a message at ERROR level.- Parameters:
message- The message.args- The message args.
-
error
public static void error(Throwable thrown, String message, Object... args)
Log a message at ERROR level with associated throwable.- Parameters:
thrown- The throwable.message- The message.args- The message args.
-
log
public static void log(Log.Level level, String message, Object... args)
Log the message if at or above the given level.- Parameters:
level- The level.message- The message.args- The message args.
-
-