Le 26/07/2016 à 09:54, Massimo Ciancio a écrit :
Hello to all
I followed your advice and I modified the appender to:
<appender name="TEST" class="ch.qos.logback.core.FileAppender">
<file>/var/log/lsc/test.log</file>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<marker>Sync_Users</marker>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<encoder>
<pattern>%d %-5level [%thread] %logger{0}: %msg%n</pattern>
<outputPatternAsHeader>true</outputPatternAsHeader>
<!-- this quadruples logging throughput -->
<immediateFlush>false</immediateFlush>
</encoder>
</appender>
This is the result:
2016-07-25 23:16:27,374 INFO [main] destination: Starting sync for
Sync_Users
2016-07-25 23:17:04,508 INFO [Sync_Users-10022] destination: # Adding
new object CN="User1" for Sync_Users
2016-07-25 23:17:04,508 INFO [Sync_Users-10022] destination:
2016-07-25 23:17:04,888 INFO [Sync_Users-10020] destination: # Adding
new object CN="User2" for Sync_Users
2016-07-25 23:17:04,888 INFO [Sync_Users-10020] destination:
2016-07-25 23:17:04,890 INFO [main] destination: Starting clean for
Sync_Users
The filter does not work ...
What am I doing wrong?
The result is very close to my need, I can only filter events of
Adding or Updating task ??
example
2016-07-25 23:17:04,508 INFO [Sync_Users-10022] destination: # Adding
new object CN="User1" for Sync_Users
2016-07-25 23:17:04,888 INFO [Sync_Users-10020] destination: # Adding
new object CN="User2" for Sync_Users
You seems to have better skills in logback than me, I never used the
onMatch/onMismatch parameters.
From my point of view, a simple grep command on the LSC log file will
give you the expected result. It is not as clean as a full logback
configuration but should work.
--
Clément OUDOT
Consultant en logiciels libres, Expert infrastructure et sécurité
Savoir-faire Linux
87, rue de Turbigo - 75003 PARIS
Blog: http://sflx.ca/coudot
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users