com.levigo.util.log.qualified
Class DefaultQualifiedLogEvent

java.lang.Object
  extended by com.levigo.util.log.qualified.DefaultQualifiedLogEvent
All Implemented Interfaces:
QualifiedLogEvent, QualifiedMessage, UnresolvedQualifiedLogEvent, UnresolvedQualifiedMessage, Serializable

public class DefaultQualifiedLogEvent
extends Object
implements UnresolvedQualifiedLogEvent

See Also:
Serialized Form

Constructor Summary
DefaultQualifiedLogEvent(Level level, MessageID msgId)
           
DefaultQualifiedLogEvent(Level level, MessageID msgId, Object... args)
           
DefaultQualifiedLogEvent(Level level, MessageID msgId, Throwable cause)
           
DefaultQualifiedLogEvent(Level level, MessageID msgId, Throwable cause, Object... args)
           
 
Method Summary
 Object[] getArguments()
           
 String getId()
          returns the message id of this logging event in the format COMPONENT_ID-EVENT_ID.
 Level getLevel()
           
 String getMessage()
          Resolves and returns the human-readable message text of this qualified entity using the current default locale, i.e.
 String getMessage(Locale locale)
          Resolves and returns the human-readable message text of this qualified entity using the specified Locale.
 MessageID getMessageID()
           
 Throwable getThrowable()
          returns a associated Throwable which may be the cause of the QualifiedLogEvent.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultQualifiedLogEvent

public DefaultQualifiedLogEvent(Level level,
                                MessageID msgId)

DefaultQualifiedLogEvent

public DefaultQualifiedLogEvent(Level level,
                                MessageID msgId,
                                Object... args)

DefaultQualifiedLogEvent

public DefaultQualifiedLogEvent(Level level,
                                MessageID msgId,
                                Throwable cause)

DefaultQualifiedLogEvent

public DefaultQualifiedLogEvent(Level level,
                                MessageID msgId,
                                Throwable cause,
                                Object... args)
Method Detail

getThrowable

public Throwable getThrowable()
Description copied from interface: QualifiedLogEvent
returns a associated Throwable which may be the cause of the QualifiedLogEvent.

Specified by:
getThrowable in interface QualifiedLogEvent
Returns:
a associated Throwable or null

getId

public String getId()
Description copied from interface: QualifiedMessage
returns the message id of this logging event in the format COMPONENT_ID-EVENT_ID. The COMPONENT_ID and EVENT_ID may contain arbitrary characters except the dash (-).

Specified by:
getId in interface QualifiedMessage
Returns:

getMessage

public String getMessage()
Description copied from interface: QualifiedMessage
Resolves and returns the human-readable message text of this qualified entity using the current default locale, i.e. the one returned by Locale.getDefault().

Caveats:

Specified by:
getMessage in interface QualifiedMessage
Returns:
a human readable message text for this QualifiedMessage entity.

getMessage

public String getMessage(Locale locale)
Description copied from interface: UnresolvedQualifiedMessage
Resolves and returns the human-readable message text of this qualified entity using the specified Locale. Message IDs are not guaranteed to be accompanied with a human-readable message. Therefore this method may return null.

Specified by:
getMessage in interface UnresolvedQualifiedMessage
Parameters:
locale - the Locale in which so resolve the message
Returns:
a human readable message text for this QualifiedMessage entity, or null if no human-readable message is available

toString

public String toString()
Overrides:
toString in class Object

getArguments

public Object[] getArguments()
Specified by:
getArguments in interface UnresolvedQualifiedMessage

getMessageID

public MessageID getMessageID()
Specified by:
getMessageID in interface UnresolvedQualifiedMessage

getLevel

public Level getLevel()
Specified by:
getLevel in interface QualifiedLogEvent


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.