lib/td/logger/agent/access_log.rb in td-logger-0.2.0 vs lib/td/logger/agent/access_log.rb in td-logger-0.2.1
- old
+ new
@@ -16,16 +16,19 @@
# Rack default
'rack.routing_args'
end
ACCESS_LOG_PRESET_PARAM_KEYS = {
- 'controller' => 'controller',
- 'action' => 'action',
+ 'controller' => :controller,
+ 'action' => :action,
}
ACCESS_LOG_PRESET_ENV_KEYS = {
- 'remote_addr' => 'REMOTE_ADDR',
+ 'ip' => 'REMOTE_ADDR',
+ 'method' => 'REQUEST_METHOD',
+ 'uri' => 'REQUEST_URI',
'referer' => 'HTTP_REFERER',
+ 'ua' => 'HTTP_USER_AGENT'
}
def self.enable_access_log(tag)
Middleware.before do |env|
data = {}