Hi Soisik,

Sorry for the delayed response

Thank you it works as well :)

best regards

Karim.


Le 30/08/2019 à 10:14, Soisik Froger a écrit :
On 29/08/2019 16:05, Karim Ayari wrote:
Hello,

is it possible to send lsc output to a rsyslog server ?

i found this https://www.loggly.com/docs/java-logback-syslog/ for the
logback configuration.

thank you.
Hi Karim,

I did a test a it worked well. You need to

* Edit /etc/rsyslog.conf as following:

- activate UDP syslog reception, uncommenting following lines in

# provides UDP syslog reception
module(load="imudp")
input(type="imudp" port="514")

- Add a facility for LSC

local0.*  -/var/log/lsc.log

- Create the file

touch /var/log/lsc.log

* Restart rsyslog deamon

* Edit logback.xml that is in your LSC configuration directory as following:

- Add a new appender:
<configuration>

   <appender name="SYSLOG" class="ch.qos.logback.classic.net.SyslogAppender">
     <syslogHost>localhost</syslogHost>
     <facility>local0</facility>
     <suffixPattern>[%thread] %logger %msg</suffixPattern>
   </appender>

- In last instruction, add SYSLOG appender to root level:
  <!-- Root logger -->
  <root level="INFO">
    <appender-ref ref="CONSOLE"/>
=> <appender-ref ref="SYSLOG"/>
  </root>
</configuration>

- It works; every lsc command will also log to local0 rsyslog facility (tested 
with lsc -v)

Regards
_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
lsc-users@lists.lsc-project.org
https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users

Reply via email to