Author Topic: Send logs to syslog server  (Read 1576 times)

Offline vletroye

  • Hero Member
  • *****
  • Posts: 714
  • Karma: +7/-0
    • View Profile
Send logs to syslog server
« on: October 24, 2013, 02:25:07 pm »
I have a NAS 24/7 (Synology) running a syslog server.

A nice feature would be to support writing logs from t-RAid into a syslog server...
Purpose: monitoring of authentications, actions started, completed, etc... from all my devices in a central repository.

V.

Offline Brahim

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8,547
  • Karma: +204/-16
    • View Profile
Re: Send logs to syslog server
« Reply #1 on: October 24, 2013, 04:26:10 pm »
Ask and you shall receive. :)

The Web UI already supports it.
Edit log4j.properties and add:
Quote
# file log4j.properties
log4j.rootLogger=TRACE, default, SyslogApender

log4j.appender.SyslogApender=org.apache.log4j.net.SyslogAppender
log4j.appender.SyslogApender.layout=org.apache.log4j.PatternLayout
log4j.appender.SyslogApender.layout.ConversionPattern=[%-5p] %c{1} - %m%n
# note the "tcp:" prefix
log4j.appender.SyslogApender.syslogHost=tcp:localhost:514

No support in host logging for the time being.
I might implement this later: http://logging.apache.org/log4cxx/

Offline vletroye

  • Hero Member
  • *****
  • Posts: 714
  • Karma: +7/-0
    • View Profile
Re: Send logs to syslog server
« Reply #2 on: October 24, 2013, 11:48:07 pm »
log4j is great  8)
I will give a try to that config for the UI...

But it will become even more interesting when the host will log too!
It sounds like you won't be out of work before next decade at least :p

V.