@Immutable public class LogMessage extends Object implements IHasErrorLevel, ISuccessIndicator, IErrorIndicator, ISeverityComparable<LogMessage>, Serializable
| Constructor and Description |
|---|
LogMessage(EErrorLevel eLevel,
Serializable aMsg,
Throwable aThrowable) |
| Modifier and Type | Method and Description |
|---|---|
EErrorLevel |
getErrorLevel() |
Date |
getIssueDateTime() |
Serializable |
getMessage() |
Throwable |
getThrowable() |
boolean |
isEqualSevereThan(LogMessage aOther)
Check if this object is of the same level (= equal important) than the
passed object.
|
boolean |
isError() |
boolean |
isFailure() |
boolean |
isLessOrEqualSevereThan(LogMessage aOther)
Check if this object is of equal or lower level (= equally or less
important) than the passed object.
|
boolean |
isLessSevereThan(LogMessage aOther)
Check if this object is of lower level (= less important) than the passed
object.
|
boolean |
isMoreOrEqualSevereThan(LogMessage aOther)
Check if this object is of equal or higher level (= equally or more
important) than the passed object.
|
boolean |
isMoreSevereThan(LogMessage aOther)
Check if this object is of higher level (= more important) than the passed
object.
|
boolean |
isNoError() |
boolean |
isSuccess() |
String |
toString() |
public LogMessage(@Nonnull EErrorLevel eLevel, @Nonnull Serializable aMsg, @Nullable Throwable aThrowable)
@Nonnull @ReturnsMutableCopy public Date getIssueDateTime()
@Nonnull public EErrorLevel getErrorLevel()
getErrorLevel in interface IHasErrorLevelnull.@Nonnull public Serializable getMessage()
public boolean isSuccess()
isSuccess in interface ISuccessIndicatortrue on success and false on failure.public boolean isFailure()
isFailure in interface ISuccessIndicatortrue on failure and false on success.public boolean isError()
isError in interface IErrorIndicatortrue if this level is at least
EErrorLevel.ERROR or worse.public boolean isNoError()
isNoError in interface IErrorIndicatortrue if this level is below
EErrorLevel.ERROR.public boolean isEqualSevereThan(@Nonnull LogMessage aOther)
ISeverityComparableisEqualSevereThan in interface ISeverityComparable<LogMessage>aOther - The object to compare to.true if this object is equally important than the
passed object!public boolean isLessSevereThan(@Nonnull LogMessage aOther)
ISeverityComparableisLessSevereThan in interface ISeverityComparable<LogMessage>aOther - The object to compare to.true if this object is less important than the passed
object!public boolean isLessOrEqualSevereThan(@Nonnull LogMessage aOther)
ISeverityComparableisLessOrEqualSevereThan in interface ISeverityComparable<LogMessage>aOther - The object to compare to.true if this object is equally or less important than
the passed object!public boolean isMoreSevereThan(@Nonnull LogMessage aOther)
ISeverityComparableisMoreSevereThan in interface ISeverityComparable<LogMessage>aOther - The object to compare to.true if this object is more important than the passed
object!public boolean isMoreOrEqualSevereThan(@Nonnull LogMessage aOther)
ISeverityComparableisMoreOrEqualSevereThan in interface ISeverityComparable<LogMessage>aOther - The object to compare to.true if this object is equally or more important than
the passed object!Copyright © 2006–2014 phloc systems. All rights reserved.