Package com.day.cq.replication
Class ListenerLogDelegator
- java.lang.Object
-
- com.day.cq.replication.ListenerLogDelegator
-
- All Implemented Interfaces:
ReplicationLog
public class ListenerLogDelegator extends java.lang.Object implements ReplicationLog
ListenerLogDelegator
implements a replication log that also sends the messages to the listener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.day.cq.replication.ReplicationLog
ReplicationLog.Level
-
-
Constructor Summary
Constructors Constructor Description ListenerLogDelegator(ReplicationLog log, ReplicationListener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
debug(java.lang.String message)
Log a message with level debug.void
debug(java.lang.String fmt, java.lang.Object... args)
Log a message with level debug.void
error(java.lang.String message)
Log a message with level error.void
error(java.lang.String fmt, java.lang.Object... args)
Log a message with level error.ReplicationLog.Level
getLevel()
Returns the log level of this logjava.util.Collection<java.lang.String>
getLines()
Returns the linesvoid
info(java.lang.String message)
Log a message with level info.void
info(java.lang.String fmt, java.lang.Object... args)
Log a message with level info.void
setLevel(ReplicationLog.Level level)
Set the log levelvoid
warn(java.lang.String message)
Log a message with level warn.void
warn(java.lang.String fmt, java.lang.Object... args)
Log a message with level warn.
-
-
-
Constructor Detail
-
ListenerLogDelegator
public ListenerLogDelegator(ReplicationLog log, ReplicationListener listener)
-
-
Method Detail
-
getLevel
public ReplicationLog.Level getLevel()
Description copied from interface:ReplicationLog
Returns the log level of this log- Specified by:
getLevel
in interfaceReplicationLog
- Returns:
- the log level
-
setLevel
public void setLevel(ReplicationLog.Level level)
Description copied from interface:ReplicationLog
Set the log level- Specified by:
setLevel
in interfaceReplicationLog
- Parameters:
level
- the log level
-
getLines
public java.util.Collection<java.lang.String> getLines()
Description copied from interface:ReplicationLog
Returns the lines- Specified by:
getLines
in interfaceReplicationLog
- Returns:
- the lines.
-
debug
public void debug(java.lang.String message)
Description copied from interface:ReplicationLog
Log a message with level debug.- Specified by:
debug
in interfaceReplicationLog
- Parameters:
message
- the log message
-
debug
public void debug(java.lang.String fmt, java.lang.Object... args)
Description copied from interface:ReplicationLog
Log a message with level debug.- Specified by:
debug
in interfaceReplicationLog
- Parameters:
fmt
- the message formatargs
- the message arguments- See Also:
String.format(String, Object...)
-
info
public void info(java.lang.String message)
Description copied from interface:ReplicationLog
Log a message with level info.- Specified by:
info
in interfaceReplicationLog
- Parameters:
message
- the log message
-
info
public void info(java.lang.String fmt, java.lang.Object... args)
Description copied from interface:ReplicationLog
Log a message with level info.- Specified by:
info
in interfaceReplicationLog
- Parameters:
fmt
- the message formatargs
- the message arguments- See Also:
String.format(String, Object...)
-
warn
public void warn(java.lang.String message)
Description copied from interface:ReplicationLog
Log a message with level warn.- Specified by:
warn
in interfaceReplicationLog
- Parameters:
message
- the log message
-
warn
public void warn(java.lang.String fmt, java.lang.Object... args)
Description copied from interface:ReplicationLog
Log a message with level warn.- Specified by:
warn
in interfaceReplicationLog
- Parameters:
fmt
- the message formatargs
- the message arguments- See Also:
String.format(String, Object...)
-
error
public void error(java.lang.String message)
Description copied from interface:ReplicationLog
Log a message with level error.- Specified by:
error
in interfaceReplicationLog
- Parameters:
message
- the log message
-
error
public void error(java.lang.String fmt, java.lang.Object... args)
Description copied from interface:ReplicationLog
Log a message with level error.- Specified by:
error
in interfaceReplicationLog
- Parameters:
fmt
- the message formatargs
- the message arguments- See Also:
String.format(String, Object...)
-
-