Class List Method List File List

# Class: VertxWeb::LoggerHandler

Inherits:
  Object
  - Object
  - VertxWeb::LoggerHandler
  show all
Defined in:
  /Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/logger_handler.rb

## Overview

A handler which logs request information to the Vert.x logger.

## Class Method Summary (collapse)

- + (::VertxWeb::LoggerHandler) create(param_1 = nil, param_2 = nil)
  Create a handler with he specified format.

## Instance Method Summary (collapse)

- - (void) handle(arg0 = nil)

## Class Method Details

### + (`::VertxWeb::LoggerHandler`) create + (`::VertxWeb::LoggerHandler`) create(format) + (`::VertxWeb::LoggerHandler`) create(immediate, format)

Create a handler with he specified format

Overloads:

- + (`::VertxWeb::LoggerHandler`) create(format)

  Parameters:

  - format (`:DEFAULT`, `:SHORT`, `:TINY`) —
    the format
- + (`::VertxWeb::LoggerHandler`) create(immediate, format)

  Parameters:

  - immediate (`true`, `false`) —
    true if logging should occur as soon as request arrives
  - format (`:DEFAULT`, `:SHORT`, `:TINY`) —
    the format

Returns:

- (`::VertxWeb::LoggerHandler`) —
  the handler

Raises:

- (`ArgumentError`)

    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/logger_handler.rb', line 33

    def self.create(param_1=nil,param_2=nil)
      if !block_given? && param_1 == nil && param_2 == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::LoggerHandler.java_method(:create, []).call(),::VertxWeb::LoggerHandler)
      elsif param_1.class == Symbol && !block_given? && param_2 == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::LoggerHandler.java_method(:create, [Java::IoVertxExtWebHandlerLoggerHandler::Format.java_class]).call(Java::IoVertxExtWebHandlerLoggerHandler::Format.valueOf(param_1)),::VertxWeb::LoggerHandler)
      elsif (param_1.class == TrueClass || param_1.class == FalseClass) && param_2.class == Symbol && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::LoggerHandler.java_method(:create, [Java::boolean.java_class,Java::IoVertxExtWebHandlerLoggerHandler::Format.java_class]).call(param_1,Java::IoVertxExtWebHandlerLoggerHandler::Format.valueOf(param_2)),::VertxWeb::LoggerHandler)
      end
      raise ArgumentError, "Invalid arguments when calling create(param_1,param_2)"
    end

## Instance Method Details

### - (`void`) handle(arg0 = nil)

This method returns an undefined value.

Parameters:

- arg0 (`::VertxWeb::RoutingContext`) (defaults to: `nil`)

Raises:

- (`ArgumentError`)

    19
    20
    21
    22
    23
    24
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/logger_handler.rb', line 19

    def handle(arg0=nil)
      if arg0.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:handle, [Java::IoVertxExtWeb::RoutingContext.java_class]).call(arg0.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling handle(arg0)"
    end