|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.logging.Handler
org.openqa.selenium.remote.server.log.PerSessionLogHandler
org.openqa.selenium.remote.server.log.DefaultPerSessionLogHandler
public class DefaultPerSessionLogHandler
RestishHandler which keeps in memory the log records per session so that users can retrieve logs per session.
Constructor Summary | |
---|---|
DefaultPerSessionLogHandler(int capacity,
Level minimumLevel,
Formatter formatter,
boolean captureLogsOnQuit)
New handler keeping track of log records per session. |
Methods inherited from class java.util.logging.Handler |
---|
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPerSessionLogHandler(int capacity, Level minimumLevel, Formatter formatter, boolean captureLogsOnQuit)
capacity
- The capacityminimumLevel
- Only keep track of records whose level is equal or greater than
minimumLevel.formatter
- Formatter to use when retrieving log messages.captureLogsOnQuit
- Whether to enable log capture on quit.Method Detail |
---|
public void publish(LogRecord record)
publish
in class PerSessionLogHandler
public void flush()
flush
in class Handler
public void close() throws SecurityException
close
in class Handler
SecurityException
public void attachToCurrentThread(org.openqa.selenium.remote.SessionId sessionId)
attachToCurrentThread
in class PerSessionLogHandler
public void transferThreadTempLogsToSessionLogs(org.openqa.selenium.remote.SessionId sessionId)
transferThreadTempLogsToSessionLogs
in class PerSessionLogHandler
public void detachFromCurrentThread()
detachFromCurrentThread
in class PerSessionLogHandler
public void removeSessionLogs(org.openqa.selenium.remote.SessionId sessionId)
removeSessionLogs
in class PerSessionLogHandler
sessionId
- The session id to use.public void clearThreadTempLogs()
clearThreadTempLogs
in class PerSessionLogHandler
public String getLog(org.openqa.selenium.remote.SessionId sessionId) throws IOException
getLog
in class PerSessionLogHandler
sessionId
- session-id for which the RC logs will be returned.
IOException
- when the elves go badpublic org.openqa.selenium.logging.LogEntries getSessionLog(org.openqa.selenium.remote.SessionId sessionId) throws IOException
getSessionLog
in class PerSessionLogHandler
sessionId
- The session id.
IOException
- If there was a problem reading from file.public List<org.openqa.selenium.remote.SessionId> getLoggedSessions()
getLoggedSessions
in class PerSessionLogHandler
public org.openqa.selenium.logging.SessionLogs getAllLogsForSession(org.openqa.selenium.remote.SessionId sessionId)
getAllLogsForSession
in class PerSessionLogHandler
sessionId
- The id of the session.
public void fetchAndStoreLogsFromDriver(org.openqa.selenium.remote.SessionId sessionId, WebDriver driver) throws IOException
fetchAndStoreLogsFromDriver
in class PerSessionLogHandler
sessionId
- The id of the session.driver
- The driver to get the logs from.
IOException
- If there was a problem reading from file.public void configureLogging(org.openqa.selenium.logging.LoggingPreferences prefs)
configureLogging
in class PerSessionLogHandler
prefs
- The logging preferences object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |