# Dont see any logs in logstash-json.log

**URL:** <https://discuss.elastic.co/t/dont-see-any-logs-in-logstash-json-log/354377>\
**Category:** Logstash\
**Created:** [February 28, 2024, 6:17pm UTC](https://discuss.elastic.co/t/dont-see-any-logs-in-logstash-json-log/354377 "2024-02-28T18:17:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pooort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pooort/32/131232_2.png) [@Pooort](https://discuss.elastic.co/u/Pooort)\
**Post date:** [February 28, 2024, 6:17pm UTC](https://discuss.elastic.co/t/dont-see-any-logs-in-logstash-json-log/354377/1 "2024-02-28T18:17:05Z")

</div>

My `log4j2.properties` setup:

```auto
appender.rolling.type = RollingFile
appender.rolling.name = plain_rolling
appender.rolling.fileName = ${sys:ls.logs}/logstash-plain.log
appender.rolling.filePattern = ${sys:ls.logs}/logstash-plain-%d{yyyy-MM-dd}-%i.log.gz
appender.rolling.policies.type = Policies
appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
appender.rolling.policies.time.interval = 1
appender.rolling.policies.time.modulate = true
appender.rolling.layout.type = PatternLayout
appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c]%notEmpty{[%X{pipeline.id}]}%notEmpty{[%X{plugin.id}]} %m%n
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.rolling.policies.size.size = 100MB
appender.rolling.strategy.type = DefaultRolloverStrategy
appender.rolling.strategy.max = 30
appender.rolling.avoid_pipelined_filter.type = PipelineRoutingFilter

appender.json_rolling.type = RollingFile
appender.json_rolling.name = json_rolling
appender.json_rolling.fileName = ${sys:ls.logs}/logstash-json.log
appender.json_rolling.filePattern = ${sys:ls.logs}/logstash-json-%d{yyyy-MM-dd}-%i.log.gz
appender.json_rolling.policies.type = Policies
appender.json_rolling.policies.time.type = TimeBasedTriggeringPolicy
appender.json_rolling.policies.time.interval = 1
appender.json_rolling.policies.time.modulate = true
appender.json_rolling.layout.type = JSONLayout
appender.json_rolling.layout.compact = true
appender.json_rolling.layout.eventEol = true
appender.json_rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.json_rolling.policies.size.size = 100MB
appender.json_rolling.strategy.type = DefaultRolloverStrategy
appender.json_rolling.strategy.max = 30
appender.json_rolling.avoid_pipelined_filter.type = PipelineRoutingFilter

```

`logstash-plain.log` is ok, but `logstash-json.log` is empty.

How to get logs in the file in json?

Thank you in advance.

---

<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 27, 2024, 6:17pm UTC](https://discuss.elastic.co/t/dont-see-any-logs-in-logstash-json-log/354377/2 "2024-03-27T18:17:53Z")

</div>

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