# The parsing of the log4j2 configuration file

**URL:** <https://discuss.elastic.co/t/the-parsing-of-the-log4j2-configuration-file/161023>\
**Category:** Elasticsearch\
**Created:** [December 16, 2018, 12:13pm UTC](https://discuss.elastic.co/t/the-parsing-of-the-log4j2-configuration-file/161023 "2018-12-16T12:13:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![li\_jessen2016](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/li_jessen2016/32/38817_2.png) [@li\_jessen2016](https://discuss.elastic.co/u/li_jessen2016)\
**Post date:** [December 16, 2018, 12:13pm UTC](https://discuss.elastic.co/t/the-parsing-of-the-log4j2-configuration-file/161023/1 "2018-12-16T12:13:14Z")

</div>

I am not familiar with xml. When I read the document about the log configuration, it writes that "appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node\_name]%marker %.-10000m%n "

What's the meaning of {ISO8601}, [%-5p], [%-25c{1.}], [%node\_name], %marker , %.-10000m ?

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [December 16, 2018, 1:56pm UTC](https://discuss.elastic.co/t/the-parsing-of-the-log4j2-configuration-file/161023/2 "2018-12-16T13:56:51Z")

</div>

This is a fairly standard log4j properties file. In general I suggest leaving it alone unless you need to do something funny with logging. If you do, I'd start a new thread asking about that.

%d{iso8601} says print the date and time in a standard format.

%-5p says print the pevel, padded to five characters and left aligned.

%-25c{1.} says to print the name of the logger, truncating in it a very particular way if it is wider than 25 characters.

%node\_name is an elasticsearch extension that logs the name of the node.

%marker is replaced by the index and shard info.

The last one is the actual log message.

---

<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:** [January 13, 2019, 1:56pm UTC](https://discuss.elastic.co/t/the-parsing-of-the-log4j2-configuration-file/161023/3 "2019-01-13T13:56:59Z")

</div>

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