Logstash using codec line is not working

I am new to ELK and having trouble configuring a simple Logstash pipeline. Despite enabling debug logging(--log.level=debug), I can only find a message that says 'Received line' in the logs, and nothing else. Not sure why this is happening and I would appreciate any help troubleshooting the issue.

input {
   file {
       path => "/var/log/*"
       start_position => "beginning"
       sincedb_path => "/dev/null"
       codec => "line"
    }
}



output {
    stdout {
        codec => rubydebug
    }
}

By the way, it worked when I removed the codec line. I want to know why the code line doesn't work.

Note:

  1. Log files exist in /var/log and are encoded in UTF-8.
  2. Logstash version: 8.8.2
  3. OS version: macOS Ventura Version 13.4.1

Thanks in advance for any help.

Hi.

You may use this maybe.

input {
   file {
       path => "/var/log/*"
       start_position => "beginning"
       sincedb_path => "/dev/null"
       codec => plain { charset => "UTF-8" }
   }
}

output {
    stdout {
        codec => rubydebug
    }
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.