-
- All Known Implementing Classes:
NoopLogger
public interface LoggerAn object responsible for logging the events of a program.- Since:
- 2
- See Also:
Event
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisEnabled(Event event)Returnstrueif the giveneventwould be logged by thisLoggerinstance.voidlog(Event0 event)Logs the given event that takes no argument.<T1> voidlog(Event1<T1> event, T1 v1)Logs the given event that takes one argument.<T1,T2>
voidlog(Event2<T1,T2> event, T1 v1, T2 v2)Logs the given event that takes two arguments.<T1,T2,T3>
voidlog(Event3<T1,T2,T3> event, T1 v1, T2 v2, T3 v3)Logs the given event that takes three arguments.Loggerreplace(Logger logger)Replaces this instance with the givenloggerinstance if it is possible to do so.
-
-
-
Method Detail
-
isEnabled
boolean isEnabled(Event event)
Returnstrueif the giveneventwould be logged by thisLoggerinstance.- Parameters:
event- the event to test- Returns:
trueif the giveneventwould be logged
-
log
void log(Event0 event)
Logs the given event that takes no argument.- Parameters:
event- an event instance
-
log
<T1> void log(Event1<T1> event, T1 v1)
Logs the given event that takes one argument.- Type Parameters:
T1- type of the log argument- Parameters:
event- an event instancev1- argument of the logged event
-
log
<T1,T2> void log(Event2<T1,T2> event, T1 v1, T2 v2)
Logs the given event that takes two arguments.- Type Parameters:
T1- type of the first log argumentT2- type of the second log argument- Parameters:
event- an event instancev1- first argument of the logged eventv2- second argument of the logged event
-
log
<T1,T2,T3> void log(Event3<T1,T2,T3> event, T1 v1, T2 v2, T3 v3)
Logs the given event that takes three arguments.- Type Parameters:
T1- type of the first log argumentT2- type of the second log argumentT3- type of the third log argument- Parameters:
event- an event instancev1- first argument of the logged eventv2- second argument of the logged eventv3- third argument of the logged event
-
-