We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using Rails 5, my configuration is :
config.log_level = :info config.logger = ActFluentLoggerRails::Logger.new( settings: { host: ENV['FLUENTD_HOST'], port: 24224, tag: "myApp-#{Rails.env}", messages_type: 'string', severity_key: 'level' }, log_tags: { ip: :ip, ua: :user_agent }) # buggy for now # https://github.com/actindi/act-fluent-logger-rails/issues/41 # uid: ->(request) { request.session[:uid] } config.lograge.enabled = true config.lograge.formatter = Lograge::Formatters::Json.new
The logs I get follows :
{"method":"GET","path":"/health","format":"html","controller":"ApplicationController","action":"health","status":200,"duration":2.53,"view":0.0,"db":0.76} {"method":"GET","path":"/health","format":"html","controller":"ApplicationController","action":"health","status":200,"duration":2.16,"view":0.0,"db":0.71} {"method":"GET","path":"/health","format":"html","controller":"ApplicationController","action":"health","status":200,"duration":2.02,"view":0.0,"db":0.65}
It seems it is ignoring ua and ip. What could be the issue ?
ua
ip
Also, how can I add timestamps to the logs ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm using Rails 5, my configuration is :
The logs I get follows :
It seems it is ignoring
ua
andip
. What could be the issue ?Also, how can I add timestamps to the logs ?
The text was updated successfully, but these errors were encountered: