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
thanks in advance.
Massimo
----- Messaggio originale -----
Da: "Clément OUDOT" <[email protected]>
A: [email protected]
Inviato: Mercoledì, 20 luglio 2016 11:26:35
Oggetto: Re: [lsc-users] Get TXT log of completed synchronizations
Le 19/07/2016 à 13:07, Massimo Ciancio a écrit :
Hello everyone
Hello Massimo,
<blockquote>
I would be grateful if you could help me in my trouble.
We need to optimize the output of synchronies performed with "LSC" in a TXT or
CSV to be forwarded to my Identity Manager to perform consequential work.
My scenario:
I own a custom Identity Manager where users are defined, Identity manager run a
workflow and update OpenLDAP and Kerberos MIT.
OpenLDAP is configured with SASL in Kerberos and has more than 12,000 users.
This OpenLDAP server is synchronized with LSC asynchronously with Microsoft
Active Directory.
Question:
I have to get an output file of LSC back to the workflow to perform other
tasks, unfortunately happens that LCS still has not finished sync with the
creation of the users that the workflow must be in error. If obtain from
logback.xml a TXT or CSV log file with a progressive ID, UID, State (INFO or
Error) could eleborare the workflow task through this log. But log in ldif not
help me and the CSV log does not use <pattern> to realize log as the following
example:
ID,Status,UID,changetype
1,INFO,UserNAME,modify
</blockquote>
I was able to use the CsvLayout defined here:
http://lsc-project.org/wiki/documentation/latest/configuration/logging#outputting_the_synchronization_in_csv_files
I had to attache this appender to logger "lsc" (and not "org.lsc") and this
create a CSV file with all changed attributes. But I can't have the status,
changetype, etc.
You can create several CSV file (one for "create", another for "update") if you
need.
Does this fits your needs?
--
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
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org
lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users