class Halite::Logging::Common

Overview

Common logging format

Instance variables to check Halite::Logging::Abstract

Halite.use("logging", logging: Halite::Logging::Common.new(skip_request_body: true))
  .get("http://httpbin.org/get")

# Or
Halite.logging(format: "common", skip_request_body: true)
  .get("http://httpbin.org/get")

# => 2018-08-31 16:56:12 +08:00 | request  | GET    | http://httpbin.org/get
# => 2018-08-31 16:56:13 +08:00 | response | 200    | http://httpbin.org/get | 1.08s | application/json

Defined in:

halite/features/logging/common.cr

Instance Method Summary

Instance methods inherited from class Halite::Logging::Abstract

colorize : Bool colorize, logger=(logger : Log) logger=, request(request) request, response(response) response, skip_benchmark : Bool skip_benchmark, skip_request_body : Bool skip_request_body, skip_response_body : Bool skip_response_body

Constructor methods inherited from class Halite::Logging::Abstract

new(*, for : String = "halite", skip_request_body : Bool = false, skip_response_body : Bool = false, skip_benchmark : Bool = false, colorize : Bool = true) new

Instance Method Detail

def request(request) #

[View source]
def response(response) #

[View source]