{"action":"created","issue":{"url":"https://api.github.com/repos/dwbutler/logstash-logger/issues/60","labels_url":"https://api.github.com/repos/dwbutler/logstash-logger/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/dwbutler/logstash-logger/issues/60/comments","events_url":"https://api.github.com/repos/dwbutler/logstash-logger/issues/60/events","html_url":"https://github.com/dwbutler/logstash-logger/issues/60","id":105854404,"number":60,"title":"Error when using MultiLogger in a Rails app","user":{"login":"jgmartin","id":581884,"avatar_url":"https://avatars.githubusercontent.com/u/581884?v=3","gravatar_id":"","url":"https://api.github.com/users/jgmartin","html_url":"https://github.com/jgmartin","followers_url":"https://api.github.com/users/jgmartin/followers","following_url":"https://api.github.com/users/jgmartin/following{/other_user}","gists_url":"https://api.github.com/users/jgmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/jgmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgmartin/subscriptions","organizations_url":"https://api.github.com/users/jgmartin/orgs","repos_url":"https://api.github.com/users/jgmartin/repos","events_url":"https://api.github.com/users/jgmartin/events{/privacy}","received_events_url":"https://api.github.com/users/jgmartin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-10T17:09:49Z","updated_at":"2015-09-11T08:35:21Z","closed_at":null,"body":"I'm attempting to use a MultiLogger within a Rails app to retain file system logging while also pushing logs to Logstash.  I'm seeing the following error:\r\n\r\n    undefined method `[]=' for #<Logger:0x007fb180089178>\r\n\r\nwhen using the following configuration:\r\n\r\n    # Required\r\n    config.logstash.type = :multi_logger\r\n\r\n     # Required. Each logger may have its own formatter.\r\n     config.logstash.outputs = [\r\n       {\r\n         type: :file,\r\n         path: \"log/#{Rails.env}.log\",\r\n         formatter: Logger::Formatter\r\n       },\r\n       {\r\n         type: :udp,\r\n         port: port,\r\n         host: host,\r\n         formatter: :json\r\n       }\r\n     ]\r\n\r\nAny other logger type works fine (including a MultiDelegator, though in that case i can't specify different formatters, which is a requirement).   The full stack trace is linked below:\r\n\r\nhttps://gist.github.com/jgmartin/96a9219367e6faabcd05\r\n\r\nAny help is much appreciated.  Thanks."},"comment":{"url":"https://api.github.com/repos/dwbutler/logstash-logger/issues/comments/139485630","html_url":"https://github.com/dwbutler/logstash-logger/issues/60#issuecomment-139485630","issue_url":"https://api.github.com/repos/dwbutler/logstash-logger/issues/60","id":139485630,"user":{"login":"dwbutler","id":746336,"avatar_url":"https://avatars.githubusercontent.com/u/746336?v=3","gravatar_id":"","url":"https://api.github.com/users/dwbutler","html_url":"https://github.com/dwbutler","followers_url":"https://api.github.com/users/dwbutler/followers","following_url":"https://api.github.com/users/dwbutler/following{/other_user}","gists_url":"https://api.github.com/users/dwbutler/gists{/gist_id}","starred_url":"https://api.github.com/users/dwbutler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwbutler/subscriptions","organizations_url":"https://api.github.com/users/dwbutler/orgs","repos_url":"https://api.github.com/users/dwbutler/repos","events_url":"https://api.github.com/users/dwbutler/events{/privacy}","received_events_url":"https://api.github.com/users/dwbutler/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T08:35:21Z","updated_at":"2015-09-11T08:35:21Z","body":"Here is the offending line of code from the [RequestId middleware](https://github.com/rails/rails/blob/dac822ef58ae05f0e805222fa8744116080165ac/actionpack/lib/action_dispatch/middleware/request_id.rb#L21)\r\n\r\nI suspect that there is a Rack middleware that is returning the Rails logger object instead of doing `@app.call`. I'll generate a new Rails app and try it out."}}