# Logstash using codec line is not working

**URL:** <https://discuss.elastic.co/t/logstash-using-codec-line-is-not-working/337816>\
**Category:** Logstash\
**Created:** [July 6, 2023, 3:30pm UTC](https://discuss.elastic.co/t/logstash-using-codec-line-is-not-working/337816 "2023-07-06T15:30:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cressprm](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@cressprm](https://discuss.elastic.co/u/cressprm)\
**Post date:** [July 6, 2023, 3:30pm UTC](https://discuss.elastic.co/t/logstash-using-codec-line-is-not-working/337816/1 "2023-07-06T15:30:28Z")

</div>

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.

```auto
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.

---

<div class="post-metadata">

**Author:** ![PodarcisMuralis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/podarcismuralis/32/122606_2.png) [@PodarcisMuralis](https://discuss.elastic.co/u/PodarcisMuralis)\
**Post date:** [July 7, 2023, 9:29pm UTC](https://discuss.elastic.co/t/logstash-using-codec-line-is-not-working/337816/2 "2023-07-07T21:29:17Z")

</div>

Hi.

You may use this maybe.

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

output {
    stdout {
        codec => rubydebug
    }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 4, 2023, 9:30pm UTC](https://discuss.elastic.co/t/logstash-using-codec-line-is-not-working/337816/3 "2023-08-04T21:30:02Z")

</div>

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