# Logstash-output-s3 line termination

**URL:** <https://discuss.elastic.co/t/logstash-output-s3-line-termination/166946>\
**Category:** Logstash\
**Created:** [February 4, 2019, 11:32am UTC](https://discuss.elastic.co/t/logstash-output-s3-line-termination/166946 "2019-02-04T11:32:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![raaone7](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@raaone7](https://discuss.elastic.co/u/raaone7)\
**Post date:** [February 4, 2019, 11:32am UTC](https://discuss.elastic.co/t/logstash-output-s3-line-termination/166946/1 "2019-02-04T11:32:07Z")

</div>

I am using the below config, problem with the config is , the events are written in the s3 file, without any line separator. making it hard to read and replay later if required.

```
s3 {
    access_key_id => "xxx"
    secret_access_key => "yyy"
    region => "us-east-1"
    bucket => "logs.hello.com"
    size_file => 10240
    time_file => 5
    codec => "plain"
    prefix => "raw-logs-backup/%{[fields][client]}/%{+YYYY}/%{+MM}/%{+dd}"
}
```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 4, 2019, 1:06pm UTC](https://discuss.elastic.co/t/logstash-output-s3-line-termination/166946/2 "2019-02-04T13:06:45Z")

</div>

It might help to specify the format in the codec

```
 codec => plain { format => "%{message}
" }
```

---

<div class="post-metadata">

**Author:** ![raaone7](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@raaone7](https://discuss.elastic.co/u/raaone7)\
**Post date:** [February 5, 2019, 4:24am UTC](https://discuss.elastic.co/t/logstash-output-s3-line-termination/166946/4 "2019-02-05T04:24:56Z")

</div>

codec =\> line { format =\> "%{message}" }  
@Badger , thanks , this did the trick

---

<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 5, 2019, 4:24am UTC](https://discuss.elastic.co/t/logstash-output-s3-line-termination/166946/5 "2019-03-05T04:24:58Z")

</div>

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