dwbutler / logstash-logger

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

Anyway to filter the personal information from the log output? #142

Open arianf opened 6 years ago

arianf commented 6 years ago

Is there anyway to have one of the outputs filter out Personally identifiable information, while having the other output have no filtering?

  multi_logger = LogStashLogger.new(
  type: :multi_logger,
  outputs: [
    { type: :file, path: 'log/raw.log', formatter: ::Logger::Formatter },
    { type: :file, path: 'log/filtered.log', formatter: ::Logger::Formatter }
  ])
dwbutler commented 6 years ago

Hi,

I imagine that you could implement a custom formatter used by the filtered log.

joshuacody commented 4 years ago

The logstop gem interfaces very well with Logstash and allows you to filter our PII easily!