public class SelenideLogger
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.ThreadLocal<java.util.Map<java.lang.String,LogEventListener>> |
listeners |
| Constructor and Description |
|---|
SelenideLogger() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addListener(java.lang.String name,
LogEventListener listener)
Add a listener (to the current thread).
|
static SelenideLog |
beginStep(java.lang.String source,
java.lang.String subject) |
static SelenideLog |
beginStep(java.lang.String source,
java.lang.String methodName,
java.lang.Object... args) |
static void |
commitStep(SelenideLog log,
LogEvent.EventStatus status) |
static void |
commitStep(SelenideLog log,
java.lang.Throwable error) |
static boolean |
hasListener(java.lang.String name)
If listener with given name is bound (added) to the current thread.
|
static void |
removeAllListeners() |
static <T extends LogEventListener> |
removeListener(java.lang.String name)
Remove listener (from the current thread).
|
protected static java.lang.ThreadLocal<java.util.Map<java.lang.String,LogEventListener>> listeners
public static void addListener(java.lang.String name,
LogEventListener listener)
name - unique name of this listener (per thread).
Can be used later to remove listener using method removeListener(String)listener - event listenerpublic static SelenideLog beginStep(java.lang.String source, java.lang.String methodName, java.lang.Object... args)
public static SelenideLog beginStep(java.lang.String source, java.lang.String subject)
public static void commitStep(SelenideLog log, java.lang.Throwable error)
public static void commitStep(SelenideLog log, LogEvent.EventStatus status)
public static <T extends LogEventListener> T removeListener(java.lang.String name)
T - class of listener to be returnedname - unique name of listener added by method addListener(String, LogEventListener)public static void removeAllListeners()
public static boolean hasListener(java.lang.String name)
name - unique name of listener added by method addListener(String, LogEventListener)addListener(String, LogEventListener) with
corresponding name has been called in current thread.