Package com.clickhouse.client.logging
Class LogMessage
- java.lang.Object
-
- com.clickhouse.client.logging.LogMessage
-
public final class LogMessage extends Object
Log message with arguments and/or error.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMessage()
Gets log message.Throwable
getThrowable()
Gets error which may or may not be null.boolean
hasThrowable()
Checks if error is available or not.static LogMessage
of(Object format, Object... arguments)
Creates a log message with arguments.
-
-
-
Method Detail
-
of
public static LogMessage of(Object format, Object... arguments)
Creates a log message with arguments. The latest argument could be ajava.lang.Throwable
providing details like stack trace of an error.- Parameters:
format
- Object format, could be nullarguments
- arguments, could be null or empty- Returns:
- log message
-
getMessage
public String getMessage()
Gets log message.- Returns:
- non-null log message
-
getThrowable
public Throwable getThrowable()
Gets error which may or may not be null.- Returns:
- error, could be null
-
hasThrowable
public boolean hasThrowable()
Checks if error is available or not.- Returns:
- true if there's error; false otherwise
-
-