public class SessionLogsToFileRepository
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
SessionLogsToFileRepository.LogFile |
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<org.openqa.selenium.remote.SessionId,SessionLogsToFileRepository.LogFile> |
sessionToLogFileMap |
| Constructor and Description |
|---|
SessionLogsToFileRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
createLogFileAndAddToMap(org.openqa.selenium.remote.SessionId sessionId)
This creates log file object which represents logs in file form.
|
void |
flushRecordsToLogFile(org.openqa.selenium.remote.SessionId sessionId,
java.util.List<java.util.logging.LogRecord> records)
This creates a mapping between session and file representation of logs if doesnt exist already.
|
java.util.List<java.util.logging.LogRecord> |
getLogRecords(org.openqa.selenium.remote.SessionId sessionId)
This returns the log records storied in the corresponding log file.
|
void |
removeLogFile(org.openqa.selenium.remote.SessionId sessionId) |
private java.util.Map<org.openqa.selenium.remote.SessionId,SessionLogsToFileRepository.LogFile> sessionToLogFileMap
public void createLogFileAndAddToMap(org.openqa.selenium.remote.SessionId sessionId)
throws java.io.IOException
sessionId - session-id for the log file entry needs to be created.java.io.IOException - file i/o exception can occur because of a temp file createdpublic void flushRecordsToLogFile(org.openqa.selenium.remote.SessionId sessionId,
java.util.List<java.util.logging.LogRecord> records)
throws java.io.IOException
sessionId - session-id to which the log records belongrecords - logRecords that need to be storedjava.io.IOException - file i/o exception can occur because of a temp file createdpublic java.util.List<java.util.logging.LogRecord> getLogRecords(org.openqa.selenium.remote.SessionId sessionId)
throws java.io.IOException
sessionId - session-id for which the file logs needs to be returned.java.io.IOException - IO exception can occur with reading the log filepublic void removeLogFile(org.openqa.selenium.remote.SessionId sessionId)