Example usage for org.openqa.selenium.remote.server.log LoggingManager perSessionLogHandler

List of usage examples for org.openqa.selenium.remote.server.log LoggingManager perSessionLogHandler

Introduction

In this page you can find the example usage for org.openqa.selenium.remote.server.log LoggingManager perSessionLogHandler.

Prototype

PerSessionLogHandler perSessionLogHandler

To view the source code for org.openqa.selenium.remote.server.log LoggingManager perSessionLogHandler.

Click Source Link

Usage

From source file:org.openqa.grid.internal.DefaultGridRegistry.java

License:Apache License

/**
 * iterates the list of incoming session request to find a potential match in the list of proxies.
 * If something changes in the registry, the matcher iteration is stopped to account for that
 * change./*from  w w w.  j  a  v a 2s  .c  o m*/
 */
private void assignRequestToProxy() {
    while (!stop) {
        try {
            testSessionAvailable.await(5, TimeUnit.SECONDS);

            newSessionQueue.processQueue(this::takeRequestHandler, configuration.prioritizer);
            // Just make sure we delete anything that is logged on this thread from memory
            LoggingManager.perSessionLogHandler().clearThreadTempLogs();
        } catch (InterruptedException e) {
            LOG.info("Shutting down registry.");
        } catch (Throwable t) {
            LOG.log(Level.SEVERE, "Unhandled exception in Matcher thread.", t);
        }
    }

}