Hi

 I have tied these its a little better in the file is now being created, 

but i'm still not getting any access logs in the file

i've tried both
cat /var/lib/go-server/config/logback-include.xml
<?xml version="1.0" encoding="UTF-8"?>
<included>
  <appender name="FILEic" 
class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>/var/log/go-server/lbinclude.log</file>
    <rollingPolicy 
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <fileNamePattern>lbinclude.%d{yyyy-MM-dd}.log.gz</fileNamePattern>
    </rollingPolicy>
    <maxHistory>7</maxHistory>
    <totalSizeCap>1GB</totalSizeCap>
    <append>true</append>
    <encoder>
      <pattern>%date{ISO8601} - %-4relative [%thread] %-5level %logger{35} 
- %msg%n</pattern>
    </encoder>
  </appender>

  <logger name="org.eclipse.jetty.server.RequestLog" level="INFO" />

  <root level="ERROR">
    <appender-ref ref="FILEic" />
  </root>

</included>

and 


  <logger name="org.eclipse.jetty.server.RequestLog" level="INFO" >
    <appender-ref ref="FILEic" />
  </logger >

the first generates some data in the file the second leaves the file empty.

logback access comes from the documentation 
on https://logback.qos.ch/access.html which is linked 
from https://github.com/logstash/logstash-logback-encoder

Many thanks

Barry

On Tuesday, 2 January 2018 19:24:20 UTC, Aravind SV wrote:
>
> Just FYI. Yes, it looks like doing this will work:
>
> mkdir config
> chown go:go config
> ln -s /etc/go/logback-include.xml /var/lib/go-server/config/
>
> On Tue, Jan 2, 2018 at 11:17 AM, Aravind SV <[email protected] 
> <javascript:>> wrote:
>
>> Hello Barry,
>>
>> On Tue, Jan 2, 2018 at 9:49 AM, 'Barry Greenwood' via go-cd <
>> [email protected] <javascript:>> wrote:
>>
>>> 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're right. It's a bug. It'll be fixed in the next release (probably 
>> through this PR <https://github.com/gocd/gocd/pull/4145>). Meanwhile, 
>> temporarily, can you see if moving the file logback-include.xml into 
>> /var/lib/go-server/config/ works?
>>
>> Here's what I tried, to ensure that this works:
>>
>> $ ls -l /var/lib/go-server/config/
>> total 4
>> -rw-r--r-- 1 go go 759 Jan  2 18:58 logback-include.xml
>> $ cat /var/lib/go-server/config/logback-include.xml
>> <?xml version="1.0" encoding="UTF-8"?>
>> <included>
>>   <appender name="test-appender" 
>> class="ch.qos.logback.core.rolling.RollingFileAppender">
>>     <file>/var/log/go-server/test.log</file>
>>     <encoder>
>>       <pattern>%date{ISO8601} %-5level [%thread] %logger{0}:%line - 
>> %msg%n</pattern>
>>     </encoder>
>>
>>     <rollingPolicy 
>> class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
>>       
>> <fileNamePattern>/var/log/go-server/test.log.%d{yyyy-MM-dd}.%i.gz</fileNamePattern>
>>       <maxFileSize>10 MB</maxFileSize>
>>       <maxHistory>10</maxHistory>
>>       <totalSizeCap>512 MB</totalSizeCap>
>>     </rollingPolicy>
>>   </appender>
>>
>>   <logger name="org.eclipse.jetty.server.RequestLog" level="INFO">
>>     <appender-ref ref="test-appender" />
>>   </logger>
>> </included>
>>
>> Once 18.1 is released, this will stop working and you can move it back to 
>> its correct place, /etc/go/logback-include.xml. Or, you can see if a 
>> symbolic link from /var/lib/go-server/config/logback-include.xml to 
>> /etc/go/logback-include.xml works.
>>
>> Cheers,
>> Aravind
>>
>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to