dwbutler / logstash-logger

Ruby logger that writes logstash events
MIT License
456 stars 118 forks source link

Default logging is still in JSON format #139

Closed arianf closed 6 years ago

arianf commented 6 years ago

These are my configurations

  config.logstash.type = :multi_delegator
  config.logstash.outputs = [
    {
      type: :file,
      path: 'log/default.log',
      formatter: ::Logger::Formatter
    },
    {
      type: :file,
      path: 'log/json.log',
      formatter: :json
    }
  ]

Both logs are in json format, how can I change one of them to be the default format before I installed the logstash-logger gem?

arianf commented 6 years ago

Figured out my issue... multi_delegator is supposed to be multi_logger

dwbutler commented 6 years ago

It would probably make sense to emit a warning if multiple formatters are passed into the MultiDelegator. This would make the configuration problem more obvious.