|
@ -4,7 +4,6 @@ module Semantic |
|
|
include AnsiColors |
|
|
include AnsiColors |
|
|
# def logger = SemanticLogger['Rails'] |
|
|
# def logger = SemanticLogger['Rails'] |
|
|
|
|
|
|
|
|
EMPTY = 'none'.freeze |
|
|
|
|
|
INTERNAL_PARAMS = %i[controller action format _method only_path].freeze |
|
|
INTERNAL_PARAMS = %i[controller action format _method only_path].freeze |
|
|
|
|
|
|
|
|
def initialize(session_key) |
|
|
def initialize(session_key) |
|
@ -66,7 +65,7 @@ module Semantic |
|
|
|
|
|
|
|
|
private |
|
|
private |
|
|
|
|
|
|
|
|
def session_value(event) = event.payload[:headers]['rack.session'].fetch(@session_key, EMPTY) |
|
|
|
|
|
|
|
|
def session_value(event) = event.payload[:headers]['rack.session'].fetch(@session_key, nil) |
|
|
def process_duration(event, additions) = "Processed in #{event.duration.round}ms (#{additions.join(' | ')})" |
|
|
def process_duration(event, additions) = "Processed in #{event.duration.round}ms (#{additions.join(' | ')})" |
|
|
end |
|
|
end |
|
|
end |
|
|
end |