org.openqa.selenium.server.log
Class SessionLogsToFileRepository

java.lang.Object
  extended by org.openqa.selenium.server.log.SessionLogsToFileRepository

public class SessionLogsToFileRepository
extends java.lang.Object


Constructor Summary
SessionLogsToFileRepository()
           
 
Method Summary
 void flushRecordsToLogFile(java.lang.String 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(java.lang.String sessionId)
          This returns the log records storied in the corresponding log file.
 void removeLogFile(java.lang.String sessionId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionLogsToFileRepository

public SessionLogsToFileRepository()
Method Detail

flushRecordsToLogFile

public void flushRecordsToLogFile(java.lang.String sessionId,
                                  java.util.List<java.util.logging.LogRecord> records)
                           throws java.io.IOException
This creates a mapping between session and file representation of logs if doesnt exist already. Writes the log records to the log file. This does *NOT* flush the logs to file. This does *NOT* clear the records after writing to file.

Parameters:
sessionId - session-id to which the log records belong
records - logRecords that need to be stored
Throws:
java.io.IOException

getLogRecords

public java.util.List<java.util.logging.LogRecord> getLogRecords(java.lang.String sessionId)
                                                          throws java.io.IOException
This returns the log records storied in the corresponding log file. This does *NOT* clear the log records in the file.

Parameters:
sessionId - session-id for which the file logs needs to be returned.
Returns:
Throws:
java.io.IOException

removeLogFile

public void removeLogFile(java.lang.String sessionId)


Copyright © 2011. All Rights Reserved.