# Logstash not reading log file but reads text file

**URL:** <https://discuss.elastic.co/t/logstash-not-reading-log-file-but-reads-text-file/262817>\
**Category:** Logstash\
**Created:** [February 1, 2021, 10:11am UTC](https://discuss.elastic.co/t/logstash-not-reading-log-file-but-reads-text-file/262817 "2021-02-01T10:11:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vighnesh\_mahadik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vighnesh_mahadik/32/83069_2.png) [@vighnesh\_mahadik](https://discuss.elastic.co/u/vighnesh_mahadik)\
**Post date:** [February 1, 2021, 10:11am UTC](https://discuss.elastic.co/t/logstash-not-reading-log-file-but-reads-text-file/262817/1 "2021-02-01T10:11:22Z")

</div>

The contents of my log file is same but it does not read the file in .log extension but is able to read it in .txt extension. reads .txt file and shows on console as well as kibana

Config for reading .txt file :-

```auto
input{
    file{
        path => ["/home/viggy/dummy/eppm.txt"],
        start_position => "beginning"
    }
}

```

Config for reading .log file :-

```auto
input{
    file{
        type => "log",
        path => ["/home/viggy/dummy/eppm.log"],
        start_position => "beginning"
    }
}

```

---

<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:** [March 1, 2021, 10:11am UTC](https://discuss.elastic.co/t/logstash-not-reading-log-file-but-reads-text-file/262817/2 "2021-03-01T10:11:52Z")

</div>

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