Ole8700 / openhab

Automatically exported from code.google.com/p/openhab
GNU General Public License v3.0
1 stars 0 forks source link

Syslog #214

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be great to send the logs to a syslogserver.

Original issue reported on code.google.com by christop...@gmail.com on 23 Mar 2013 at 4:53

GoogleCodeExporter commented 9 years ago
which logs (exactly)?

Original comment by teichsta on 4 Apr 2013 at 10:52

GoogleCodeExporter commented 9 years ago
At first "openhab.log".
But all logs would be nice, too. :)

Original comment by christop...@gmail.com on 5 Apr 2013 at 12:03

GoogleCodeExporter commented 9 years ago
since the logback library can "speak" syslog by using the SyslogAppender 
(http://logback.qos.ch/manual/appenders.html#SyslogAppender) this should be 
just a matter of configuration (logback.xml / log back_debug.xml).

Would be great to learn from your experience.

Original comment by teichsta on 5 Apr 2013 at 12:58

GoogleCodeExporter commented 9 years ago
for now i would like to close this issue as the requirement can be achieved by 
using existing mechanisms. If there is still something missing from your point 
of view please feel free to open this issue again.

Original comment by teichsta on 9 Apr 2013 at 9:00

GoogleCodeExporter commented 9 years ago
fyi: I got it working.

You just need to add some lines to your logback.xml.

Like:
<appender name="SYSLOG" class="ch.qos.logback.classic.net.SyslogAppender">
  <syslogHost>localhost</syslogHost>
  <facility>AUTH</facility>
  <suffixPattern>{}openhab: [%thread] %logger %msg</suffixPattern>
</appender>

<root level="INFO">
  <appender-ref ref="SYSLOG" />
</root>

Original comment by christop...@gmail.com on 26 Apr 2013 at 8:47

GoogleCodeExporter commented 9 years ago
Great, thanks, you just made it to the very first entry on our brand new 
tips&tricks page :-)
https://code.google.com/p/openhab-samples/wiki/Tricks

Original comment by kai.openhab on 26 Apr 2013 at 8:52