code: protected LogHandler createLogHandler(ServletConfig pServletConfig, final boolean pDebug) {
          return new LogHandler() {
              /** {@inheritDoc} */
              public void debug(String message) {
                  if (pDebug) {
                      log(message);
                  }
              }
  
              /** {@inheritDoc} */
              public void info(String message) {
                  log(message);
              }
  
              /** {@inheritDoc} */
              public void error(String message, Throwable t) {
                  log(message,t);
              }
          };
      }
docs: Create a log handler using this servlet's logging facility for logging. This method can be overridden
  to provide a custom log handler. This method is called before {@link RestrictorFactory#createRestrictor(Configuration,LogHandler)} so the log handler
  can already be used when building up the restrictor.
  
  @return a default log handler
  @param pServletConfig servlet config from where to get information to build up the log handler
  @param pDebug whether to print out  debug information.