<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} .ms-cui-menu {background-color:#ffffff;border:1px rgb(171, 171, 171) solid;font-family:'Segoe UI WPC', 'Segoe UI', Tahoma, 'Microsoft Sans Serif', Verdana, sans-serif;font-size:11pt;color:rgb(51, 51, 51);} .ms-cui-menusection-title {display:none;} .ms-cui-ctl {vertical-align:text-top;text-decoration:none;color:rgb(51, 51, 51);} .ms-cui-ctl-on {background-color:rgb(223, 237, 250);opacity: 0.8;} .ms-cui-img-cont-float {display:inline-block;margin-top:2px} .ms-cui-smenu-inner {padding-top:0px;} .ms-owa-paste-option-icon {margin: 2px 4px 0px 4px;vertical-align:sub;padding-bottom: 2px;display:inline-block;} .ms-rtePasteFlyout-option:hover {background-color:rgb(223, 237, 250) !important;opacity:1 !important;} .ms-rtePasteFlyout-option {padding:8px 4px 8px 4px;outline:none;} .ms-cui-menusection {float:left; width:85px;height:24px;overflow:hidden}--></style>
</head>
<body>
<div style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<span style="font-family: 'courier new', monospace; font-size: 11pt;">Hi,</span>
<div><br style="font-family: 'courier new', monospace; font-size: 11pt;">
</div>
<div><span style="font-family: 'courier new', monospace; font-size: 11pt;">I'm having some trouble getting my custom appender which extends RollingFileAppender working. I've got my logback config being read and can extend FileAppender w/o issues but when I
switch over to RollingFileAppender, I get the following:</span></div>
<div><span style="font-family: 'courier new', monospace; font-size: 11pt;"><span style="font-family: 'courier new', monospace;"><span style="font-family: 'courier new', monospace;">java.lang.NullPointerException: null</span></span></span><br style="font-family: 'courier new', monospace; font-size: 11pt;">
<span style="font-family: 'courier new', monospace; font-size: 11pt;"><span style="font-family: 'courier new', monospace;"><span style="font-family: 'courier new', monospace;"> at ch.qos.logback.core.rolling.RollingFileAppender.getFile(RollingFileAppender.java:122)
~[org.apache.sling.commons.log:4.0.0]</span></span></span><br style="font-family: 'courier new', monospace; font-size: 11pt;">
<span style="font-family: 'courier new', monospace; font-size: 11pt;"></span>
<div>
<p><br style="font-family: 'courier new', monospace; font-size: 11pt;">
</p>
<div name="divtagdefaultwrapper" style="font-family: calibri, arial, helvetica, sans-serif; margin: 0px;">
<div style="color: #282828; background-color: #ffffff; margin: 0px;"><span style="font-size: 11pt;"><span style="font-family: 'courier new', monospace;"></span><span style="background-color: #ffffff; font-family: 'courier new', monospace;"><span style="font-family: 'courier new', monospace;">Here
is my config:</span></span><br style="font-family: 'courier new', monospace;">
</span></div>
<div style="color: #282828; background-color: #ffffff; margin: 0px;"><span style="font-family: 'courier new', monospace; font-size: 11pt;"><span style="font-family: 'courier new', monospace;"><appender name="CUSTOM" class="com.mypackage.logging.CustomLogAppender"></span></span></div>
<div style="color: #282828; font-family: 'segoe ui wpc', 'segoe ui', tahoma, 'microsoft sans serif', verdana, sans-serif; font-size: 15px; background-color: #ffffff; margin: 0px;">
<span style="font-family: 'courier new', monospace; font-size: 11pt;"></span><span style="font-family: 'courier new', monospace; font-size: 11pt;"><span style="font-family: 'courier new', monospace;"><rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"></span></span><br style="font-family: 'courier new', monospace; font-size: 11pt;">
<span style="font-family: 'courier new', monospace; font-size: 11pt;"><span style="font-family: 'courier new', monospace;"><fileNamePattern>log.%d{yyyy-MM-dd}.log</fileNamePattern></span></span><br style="font-family: 'courier new', monospace; font-size: 11pt;">
<span style="font-family: 'courier new', monospace; font-size: 11pt;"><span style="font-family: 'courier new', monospace;"></rollingPolicy></span></span><br style="font-family: 'courier new', monospace; font-size: 11pt;">
<span style="font-family: 'courier new', monospace; font-size: 11pt;"><span style="font-family: 'courier new', monospace;"><prudent>true</prudent></span></span><br style="font-family: 'courier new', monospace; font-size: 11pt;">
<span style="font-family: 'courier new', monospace; font-size: 11pt;"><span style="font-family: 'courier new', monospace;"><encoder></span></span><br style="font-family: 'courier new', monospace; font-size: 11pt;">
<span style="font-family: 'courier new', monospace; font-size: 11pt;"><span style="font-family: 'courier new', monospace;"><pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</pattern></span></span><br style="font-family: 'courier new', monospace; font-size: 11pt;">
<span style="font-family: 'courier new', monospace; font-size: 11pt;"><span style="font-family: 'courier new', monospace;"></encoder></span></span><br style="font-family: 'courier new', monospace; font-size: 11pt;">
<span style="font-family: 'courier new', monospace; font-size: 11pt;"><span style="font-family: 'courier new', monospace;"></appender></span></span><span style="font-family: calibri, arial, helvetica, sans-serif; font-size: 16px; background-color: #ffffff;"><br>
</span></div>
</div>
</div>
</div>
<br style="font-family: 'courier new', monospace; font-size: 11pt;">
<div><span style="font-family: 'courier new', monospace; font-size: 11pt;">The only method that I override is writeout() as I needed to handle some particular events. Did I missing something obvious in terms of configuration? Any help is appreciated.</span><br>
</div>
<div><span style="font-family: 'courier new', monospace; font-size: 11pt;"><br>
</span></div>
<div><span style="font-family: 'courier new', monospace; font-size: 11pt;">Thanks!</span></div>
<div><span style="font-family: 'courier new', monospace; font-size: 11pt;"><br>
</span></div>
<div><span style="font-family: 'courier new', monospace; font-size: 11pt;">Johny</span></div>
</div>
</body>
</html>