# Filebeat log format

**URL:** <https://discuss.elastic.co/t/filebeat-log-format/330801>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 26, 2023, 8:10am UTC](https://discuss.elastic.co/t/filebeat-log-format/330801 "2023-04-26T08:10:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![evanzhang87](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/evanzhang87/32/120222_2.png) [@evanzhang87](https://discuss.elastic.co/u/evanzhang87)\
**Post date:** [April 26, 2023, 8:10am UTC](https://discuss.elastic.co/t/filebeat-log-format/330801/1 "2023-04-26T08:10:31Z")

</div>

Hello, I'm using latest beats, but my log format is json,

```auto
{"log.level":"info","@timestamp":"2023-04-26T15:59:22.412+0800","log.origin":{"file.name":"instance/beat.go","file.line":779},"message":"Home path: [/Users/evan/go/src/github.com/beats/filebeat] Config path: [/Users/evan/go/src/github.com/beats/filebeat] Data path: [/Users/evan/go/src/github.com/beats/filebeat/data] Logs path: [/Users/evan/go/src/github.com/beats/filebeat/logs]","service.name":"filebeat","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-04-26T15:59:22.413+0800","log.origin":{"file.name":"instance/beat.go","file.line":787},"message":"Beat ID: d246d7f0-3e2b-4eb6-86e9-8090783e5f3a","service.name":"filebeat","ecs.version":"1.6.0"}

```

how can I get log format like this:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/8/e83ca9b539cd99433018abd1ccf431825d3f9162.png)

> **[Configure logging | Filebeat Reference \[8.7\] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-logging.html#_logging_format)**

Thanks.

---

<div class="post-metadata">

**Author:** ![yohny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yohny/32/120242_2.png) [@yohny](https://discuss.elastic.co/u/yohny)\
**Post date:** [April 26, 2023, 2:16pm UTC](https://discuss.elastic.co/t/filebeat-log-format/330801/2 "2023-04-26T14:16:18Z")

</div>

I assume that the format you want to achieve is for your app's log file (as thats the only thing that would make sense). This has nothig to do with `filebeat`, you have to conffigure logging library/framework that your app uses for logging.

---

<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:** [May 24, 2023, 4:16pm UTC](https://discuss.elastic.co/t/filebeat-log-format/330801/3 "2023-05-24T16:16:51Z")

</div>

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