Class UserBrowserLogHandler
- java.lang.Object
-
- java.util.logging.Handler
-
- java.util.logging.StreamHandler
-
- com.dkfqs.selenium.seleniumdriver.UserBrowserLogHandler
-
public class UserBrowserLogHandler extends java.util.logging.StreamHandlerA user-specific log handler which stores the selenium browser log in memory.
-
-
Constructor Summary
Constructors Constructor Description UserBrowserLogHandler(int userNumber)Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>getFormattedLogLines(boolean clearLog)Get the lines of the log.intgetNumberOfLogLines()Get the number of stored log lines.intgetUserNumber()Get the simulated user number, as passed by the constructor.voidpublish(java.util.logging.LogRecord logRecord)Implements the log handler, but stores the log record in memory only.
-
-
-
Method Detail
-
publish
public void publish(java.util.logging.LogRecord logRecord)
Implements the log handler, but stores the log record in memory only.- Overrides:
publishin classjava.util.logging.StreamHandler- Parameters:
logRecord- the received log record- See Also:
getFormattedLogLines(boolean)
-
getUserNumber
public int getUserNumber()
Get the simulated user number, as passed by the constructor.- Returns:
- the simulated user number, or -1 if no such information is available
-
getNumberOfLogLines
public int getNumberOfLogLines()
Get the number of stored log lines.- Returns:
- the number of stored log lines
-
getFormattedLogLines
public java.util.List<java.lang.String> getFormattedLogLines(boolean clearLog)
Get the lines of the log.- Parameters:
clearLog- if true = clear the stored log records after this method is called- Returns:
- the lines of the log
-
-