Latest Release
- Stable version 1.2.1 (15/07/10)
- Old stable version 1.1.2 (07/12/09)
- Nightly builds available to test
Events
- 9/07/2010 - RMLL (Bordeaux, France)
- 10-11/04/2010 - Loadays (Antwerp, Belgium)
- 6-7/02/2010 - FOSDEM (Brussels, Belgium)
- 20/09/2009 - LDAPCon 2009 (Portland, OR, USA)
- 10/07/2009 - RMLL (Nantes)
- 25/06/2009 - LinuxTag (Berlin)
Community
Get help, contribute or find professional services ...
Find out more!
Search
Download | Read more... | Get started!
Managing output format through LogBackLSC uses the LogBack library to output various messages. You can enable multiple outputs with different format by simply changing the configuration in the etc/logback.xml file. The outputs uses the layouts of logback. So you first have to create an appender, you can find documentation of the appenders here : http://logback.qos.ch/manual/appenders.html. The configuration for a file appender is here : http://logback.qos.ch/manual/appenders.html#FileAppender. Then you have to include this Appender (which is only the output destination description) to a logger like the following sample : <appender name="FILE" class="ch.qos.logback.core.FileAppender"> <.../> </appender> <logger name="org.lsc" level="INFO"> <appender-ref ref="FILE"/> </logger> Outputting the synchronization in CSV filesIn LSC you have a specific layout to log every action in a CSV file. This uses the log4j logs, so you have to declare this in the /etc/logback.xml file. Here is a small example : <appender name="FILE" class="ch.qos.logback.core.FileAppender"> <File>/tmp/csv.log</File> <Append>true</Append> <layout class="org.lsc.utils.output.CsvLayout"> <logOperations>create,update</logOperations> <attrs>dn;uid;sn;givenName;description;cn;mail;;objectClass;userAccountControl</attrs> <separator>;</separator> <outputHeader>true</outputHeader> <taskNames>MyTask</taskNames> </layout> </appender> Use the ch.qos.logback.core.FileAppender or any subclass as an appender. Specify the path to the csv file you want to write to in the tag <File>. Use the org.lsc.utils.output.CsvLayout for the layout This specific layout has 4 options :
Note: The special attribute name “dn” can be used to output the entry's distinguishedName. You can specify multiple loggers using the same layout and different options. For example, you can specify 4 loggers, one for each actions. Outputting the synchronization in LDIF filesIn LSC you have a specific layout to log every action in a LDIF file. This uses the logback logs, so you have to declare this in the logback.xml file. Here is a small example: <appender name="FILE" class="ch.qos.logback.core.FileAppender"> <File>/tmp/csv.log</File> <Append>true</Append> <layout class="org.lsc.utils.output.LdifLayout"> <logOperations>create,update</logOperations> <onlyLdif>true</onlyLdif> </layout> </appender> The parameters are the same as for the CsvLayout |


