DockerFluentLogger
@TODO
Installation
Add this line to your application's Gemfile:
gem 'docker-fluent-logger'
And then execute:
$ bundle
Or install it yourself as:
$ gem install docker-fluent-logger
Setup
Execute following command in root directory of application.
$ bundle exec docker-fluent-logger install
create config/initializers/lograge.rb
Add following code to app/controller/application_controller.rb.
def append_info_to_payload(payload)
super
payload[:uuid] = request.uuid
payload[:url] = request.url
payload[:referer] = request.referer
payload[:remote_ip] = request.remote_ip
payload[:user_agent] = request.user_agent
end
Add following code to config/environments/***.rb.
config.log_formatter = DockerFluentLogger::Formatter::Json.new
License
MIT