--
Hi I am trying to configure logback and access logs but this doesnt appear to work. following the documentation i've come up with the below jetty.xml. However the logback-access.xml doesn't ever seem to be read.
<Get name="handler">
<Call name="addHandler">
<Arg>
<New class="org.eclipse.jetty.server.handler.RequestLogHandler">
<Set name="requestLog">
<Set name="requestLogHandler">
<New id="requestLogImpl" class="ch.qos.logback.access.jetty.RequestLogImpl"></New>
<Set name="fileName">/etc/go/logback-access.xml</Set>
</Set>
</Set>
</New>
</Arg>
</Call>
</Get>the below is the logback.xml (which appears to be needed but is missing from the documentation.
<configuration>
<!-- To Be Managed by puppet -->
<include file="/etc/go/logback-include.xml"/><appender name="SOCKET" class="ch.qos.logback.classic.net.SocketAppender">
<remoteHost>SD-LOGSTASH.sysdev.zen.co.uk</remoteHost>
<port>3319</port>
<reconnectionDelay>10000</reconnectionDelay>
<includeCallerData>true</includeCallerData>
<encoder>
<pattern>%h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}"</pattern>
</encoder>
</appender><appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>/var/log/go-server/lbfile.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>lbfile.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
</rollingPolicy>
<maxHistory>7</maxHistory>
<totalSizeCap>3GB</totalSizeCap>
<append>true</append>
<!-- set immediateFlush to false for much higher logging throughput -->
<immediateFlush>true</immediateFlush>
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%-4relative [%thread] %-5level %logger{35} - %date{ISO8601} - %msg%n</pattern>
</encoder>
</appender><appender name="FILEac" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/var/log/go-server/lbaccess.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>lbaccess.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
</rollingPolicy>
<maxHistory>7</maxHistory>
<totalSizeCap>1GB</totalSizeCap>
<append>true</append>
<encoder>
<pattern>combined</pattern>
</encoder>
</appender><root level="WARN">
<appender-ref ref="FILE" />finally the below is the logback-access.xml which doenst seem to be imported (the base log file isnt created)
<configuration>
<!-- always a good activate OnConsoleStatusListener -->
<statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /><appender name="ROLFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/var/log/go-server/lb-access.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>lbaccess.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
</rollingPolicy><encoder>
<pattern>combined</pattern>
</encoder>
</appender><appender-ref ref="ROLFILE" />
</configuration>Many Thanks for any help, Barry
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Tue, Dec 19, 2017 at 10:27 PM 'Barry Greenwood' via go-cd <go...@googlegroups.com> wrote:I am on 17.12, I have got logback working for application logs however the access logs state i need to import an logback-access.xml
I don't believe there is any GoCD document that says so.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
Thanks for the help however i am still having issues./etc/default/logback-include.xml as described but with a with a file appender in it does not create the file, that implies this isn't being read
--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+unsubscribe@googlegroups.com.