Example usage for org.apache.wicket.protocol.http WebApplication getRequestLogger

List of usage examples for org.apache.wicket.protocol.http WebApplication getRequestLogger

Introduction

In this page you can find the example usage for org.apache.wicket.protocol.http WebApplication getRequestLogger.

Prototype

public final IRequestLogger getRequestLogger() 

Source Link

Document

Gets the IRequestLogger .

Usage

From source file:de.alpharogroup.wicket.base.util.application.ApplicationExtensions.java

License:Apache License

/**
 * Gets the request logger from the given WebApplication.
 *
 * @param webApplication//from www . java 2s.com
 *            the web application
 * @return the request logger
 */
public static IRequestLogger getRequestLogger(WebApplication webApplication) {
    if (webApplication == null) {
        webApplication = (WebApplication) Application.get();
    }
    IRequestLogger requestLogger = webApplication.getRequestLogger();
    if (requestLogger == null) {
        requestLogger = new RequestLogger();
    }
    return requestLogger;
}

From source file:de.alpharogroup.wicket.base.util.SessionExtensions.java

License:Apache License

/**
 * Gets the request logger from the given WebApplication.
 *
 * @param webApplication/*from  w w  w  .j  a v a  2  s . co  m*/
 *            the web application
 * @return the request logger
 */
public static IRequestLogger getRequestLogger(final WebApplication webApplication) {
    IRequestLogger requestLogger;
    if (webApplication == null) {
        requestLogger = ((WebApplication) Application.get()).getRequestLogger();
    } else {
        requestLogger = webApplication.getRequestLogger();
    }

    if (requestLogger == null) {
        requestLogger = new RequestLogger();
    }
    return requestLogger;
}