[logback-user] logback.xml configuration scan (Glassfish 3.1)

Sven Hafner s.hafner at bevisible-online.com
Fri May 6 03:05:07 CEST 2011


as simple as this:

<?xml version="1.0" encoding="UTF-8"?>

<configuration scan="true" scanPeriod="20 seconds">
<statusListener
class="ch.qos.logback.core.status.OnConsoleStatusListener" />

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
        <pattern>%d{HH:mm:ss.SSS} [%-4relative] [%thread] %-5level %
logger{36} - %msg%n</pattern>
    </encoder>
</appender>

<root level="info">
    <appender-ref ref="STDOUT" />
</root>

</configuration>




On Thu, 2011-05-05 at 10:36 +0200, Yihya Hugirat wrote:
> it is the same configuration that i have, for me it works fine.
> maybe you should attach the logback.xml file to see if there another
> problems.
> 
> On Thu, May 5, 2011 at 10:08 AM, Sven Hafner
> <s.hafner at bevisible-online.com> wrote:
>         Hi !
>         
>         I use below settings and deploy to Glassfish. Logback.xml is
>         not inside
>         the warfile, but I copy it to the classes folder
>         under /domain/application/...
>         
>         
>         <configuration scan="true" scanPeriod="20 seconds"
>         debug="true">
>         <statusListener
>         class="ch.qos.logback.core.status.OnConsoleStatusListener" />
>         
>         When deploying or restarting the app the config is read
>         ..
>         16:02:41,826 |-INFO in
>         ch.qos.logback.classic.joran.action.ConfigurationAction -
>         Setting
>         ReconfigureOnChangeFilter scanning period to 20 seconds
>         16:02:41,826 |-INFO in
>         ch.qos.logback.classic.turbo.ReconfigureOnChangeFilter at 12a0ca7
>         - Will
>         scan for changes in
>         [[/home/sven/glassfish3/glassfish/domains/domain1/applications/HelloLog/WEB-INF/classes/logback.xml]] every 20 seconds.
>         16:02:41,826 |-INFO in
>         ch.qos.logback.classic.joran.action.ConfigurationAction -
>         Adding
>         ReconfigureOnChangeFilter as a turbo filter
>         16:02:41,828 |-INFO in
>         ch.qos.logback.core.joran.action.StatusListenerAction - Adding
>         status
>         listener of type
>         [ch.qos.logback.core.status.OnConsoleStatusListener]
>         ..
>         
>         but it does not re-read on any change, only restarting the app
>         will read
>         changes like debug-level change.
>         
>         Any ideas ?
>         
>         Thanks !
>         Sven
>         
>         _______________________________________________
>         Logback-user mailing list
>         Logback-user at qos.ch
>         http://qos.ch/mailman/listinfo/logback-user
> 
> 
> 
> -- 
 <إِنَّ الَّذِينَ يُحِبُّونَ أَنْ تَشِيعَ الْفَاحِشَةُ فِي الَّذِينَ
 <آمَنُوا لَهُمْ عَذَابٌ أَلِيمٌ فِي الدُّنْيَا وَالآخِرَةِ وَاللَّهُ
 <يَعْلَمُ وَأَنْتُمْ لا تَعْلَمُونَ
> 
> 
> My public key please use it when you contact me:
 <هذا مفتاحي العام الرجاء أستخدامه عند الإتصال بي:
> 
> 09BA B710 4B98 ECDA 8C0A 6CB1 2E1E CF88 6A12 F2C3
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user




More information about the Logback-user mailing list