Package org.openqa.selenium.logging
Class LocalLogs
- java.lang.Object
-
- org.openqa.selenium.logging.LocalLogs
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
LocalLogs()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
addEntry(java.lang.String logType, LogEntry entry)
abstract LogEntries
get(java.lang.String logType)
Fetches available log entries for the given log type.static LocalLogs
getCombinedLogsHolder(LocalLogs predefinedTypeLogger, LocalLogs allTypesLogger)
See documentation of CompositeLocalLogs about the difference between the first LocalLogs instance and the second one.static LocalLogs
getHandlerBasedLoggerInstance(LoggingHandler loggingHandler, java.util.Set<java.lang.String> logTypesToInclude)
static LocalLogs
getNullLogger()
Logger which doesn't do anything.static LocalLogs
getStoringLoggerInstance(java.util.Set<java.lang.String> logTypesToIgnore)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openqa.selenium.logging.Logs
getAvailableLogTypes
-
-
-
-
Method Detail
-
getNullLogger
public static LocalLogs getNullLogger()
Logger which doesn't do anything.- Returns:
- the null logger
-
getStoringLoggerInstance
public static LocalLogs getStoringLoggerInstance(java.util.Set<java.lang.String> logTypesToIgnore)
-
getHandlerBasedLoggerInstance
public static LocalLogs getHandlerBasedLoggerInstance(LoggingHandler loggingHandler, java.util.Set<java.lang.String> logTypesToInclude)
-
getCombinedLogsHolder
public static LocalLogs getCombinedLogsHolder(LocalLogs predefinedTypeLogger, LocalLogs allTypesLogger)
See documentation of CompositeLocalLogs about the difference between the first LocalLogs instance and the second one.- Parameters:
predefinedTypeLogger
- LocalLogs which pre-defines the log types it stores.allTypesLogger
- LocalLogs which can store log entries for all log types.- Returns:
- A LocalLogs instance.
-
get
public abstract LogEntries get(java.lang.String logType)
Description copied from interface:Logs
Fetches available log entries for the given log type. Note that log buffers are reset after each call, meaning that available log entries correspond to those entries not yet returned for a given log type. In practice, this means that this call will return the available log entries since the last call, or from the start of the session. For more info on enabling logging, look atLoggingPreferences
.
-
addEntry
public abstract void addEntry(java.lang.String logType, LogEntry entry)
-
-