<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>patternlayout Archives - Creatronix</title>
	<atom:link href="https://creatronix.de/tag/patternlayout/feed/" rel="self" type="application/rss+xml" />
	<link>https://creatronix.de/tag/patternlayout/</link>
	<description>My adventures in code &#38; business</description>
	<lastBuildDate>Sun, 03 Nov 2024 08:20:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>Log4j2 PatternLayout Cheatsheet</title>
		<link>https://creatronix.de/log4j2-patternlayout-cheatsheet/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Tue, 27 Apr 2021 09:22:47 +0000</pubDate>
				<category><![CDATA[Kotlin & Java]]></category>
		<category><![CDATA[kotlin]]></category>
		<category><![CDATA[log4j2]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[patternlayout]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=3567</guid>

					<description><![CDATA[<p>In Log4j2 for Kotlin I&#8217;ve showed you how to configure a basic logger with log4j2. If you use a PatternLayout like this appender.console.layout.type = PatternLayout appender.console.layout.pattern = %m%n you can customize the appearance of the output. eg. appender.console.layout.pattern = %d{yyyy-mm-dd-HH:mm:ss.SSS} %-4p %C{1}.%M [%t] - %m%n%ex Parameter Parameter Meaning %m The log message %n line break&#8230;</p>
<p>The post <a href="https://creatronix.de/log4j2-patternlayout-cheatsheet/">Log4j2 PatternLayout Cheatsheet</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In <a href="https://creatronix.de/log4j2-for-kotlin/">Log4j2 for Kotlin</a> I&#8217;ve showed you how to configure a basic logger with log4j2.</p>
<p>If you use a PatternLayout like this</p>
<pre>appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %m%n</pre>
<p>you can customize the appearance of the output.</p>
<p>eg.</p>
<pre>appender.console.layout.pattern = %d{yyyy-mm-dd-HH:mm:ss.SSS} %-4p %C{1}.%M [%t] - %m%n%ex</pre>
<h2>Parameter</h2>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td>%m</td>
<td>The log message</td>
</tr>
<tr>
<td>%n</td>
<td>line break</td>
</tr>
<tr>
<td>%d</td>
<td>timestamp</td>
</tr>
<tr>
<td>%p</td>
<td>priority</td>
</tr>
<tr>
<td>%t</td>
<td>thread</td>
</tr>
<tr>
<td>%C</td>
<td>class</td>
</tr>
</tbody>
</table>
<h2>Timestamps</h2>
<p>&nbsp;</p>
<pre>%d{yyyy-mm-dd-HH:mm:ss.SSS}
2021-50-27-10:50:32.701</pre>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td>yyyy</td>
<td>year in four digits</td>
</tr>
<tr>
<td>MM</p>
<p>MMM</td>
<td>month in two digits</p>
<p>Name of month three characters wide</td>
</tr>
<tr>
<td>dd</td>
<td>day</td>
</tr>
<tr>
<td>HH</td>
<td>hour</td>
</tr>
<tr>
<td>mm</td>
<td>minutes</td>
</tr>
<tr>
<td>ss</td>
<td>seconds</td>
</tr>
<tr>
<td>SSS</td>
<td>milliseconds</td>
</tr>
</tbody>
</table>
<p>The post <a href="https://creatronix.de/log4j2-patternlayout-cheatsheet/">Log4j2 PatternLayout Cheatsheet</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
