struct
Azu::ErrorContext
- Azu::ErrorContext
- Struct
- Value
- Object
Overview
Enhanced error context for better debugging
Defined in:
azu/error.crConstructors
Class Method Summary
- .from_http_context(context : HTTP::Server::Context, request_id : String | Nil = nil, load_environment : Bool = true)
-
.lightweight_from_http_context(context : HTTP::Server::Context, request_id : String | Nil = nil)
Create a lightweight context without environment data
Instance Method Summary
- #endpoint : String | Nil
-
#environment : Hash(String, String) | Nil
Lazy getter for environment data
- #headers : HTTP::Headers | Nil
- #ip_address : String | Nil
- #method : String | Nil
- #params : Hash(String, String) | Nil
- #referer : String | Nil
- #request_id : String | Nil
- #session_id : String | Nil
- #timestamp : Time
- #to_h
- #to_json(json : JSON::Builder)
- #user_agent : String | Nil
- #user_id : String | Nil
Constructor Detail
def self.new(timestamp : Time = Time.utc, request_id : Nil | String = nil, user_id : Nil | String = nil, session_id : Nil | String = nil, ip_address : Nil | String = nil, user_agent : Nil | String = nil, referer : Nil | String = nil, endpoint : Nil | String = nil, method : Nil | String = nil, params : Nil | Hash(String, String) = nil, headers : HTTP::Headers | Nil = nil, _load_environment : Bool = false)
#
Class Method Detail
def self.from_http_context(context : HTTP::Server::Context, request_id : String | Nil = nil, load_environment : Bool = true)
#
def self.lightweight_from_http_context(context : HTTP::Server::Context, request_id : String | Nil = nil)
#
Create a lightweight context without environment data