#193 syslog appender with win32 system


I need to get a win32 application to send logs to a syslog server. This application has been using log4cplus for years to write logs to a file. When I try to use the SysLogAppender class, the compiler gives me errors. Upon investigation, I noticed syslogappender.h, line 21:

#if defined(LOG4CPLUS_HAVE_SYSLOG_H) && !defined(_WIN32)

Well, I assume that since our application is a win32 app, this class won't compile, because of the !defined(_WIN32). Does this mean log4cplus doesn't support syslog in win32 applications? If it does, then what am I doing wrong?

Thank you!


  • Václav Haisman

    Václav Haisman - 2009-04-19

    SyslogAppender is not supported on Windows because it is implemented in terms of syslog(3) function which is not available on Windows. Because of that, logging into remote syslogd is not supported even on POSIX platform. It looks like it would be a nice feature to have, though. I am moving this into the Feature Requests tracker.

  • Václav Haisman

    Václav Haisman - 2009-04-19
    • assigned_to: nobody --> wilx
  • Václav Haisman

    Václav Haisman - 2009-04-19
    • milestone: --> Next_Release
  • Václav Haisman

    Václav Haisman - 2013-01-08
    • labels: --> implemented
    • status: open --> closed
  • Václav Haisman

    Václav Haisman - 2013-01-08

    SyslogAppender works on Windows as well in 1.1.0 and later. The implementation is capable of using Syslog over UDP to a remote host.

    Last edit: Václav Haisman 2013-01-08
  • Václav Haisman

    Václav Haisman - 2013-07-14

    Ticket moved from /p/log4cplus/feature-requests/13/

  • Václav Haisman

    Václav Haisman - 2013-08-14
    • labels: implemented --> implemented, v1.1.0
    • Group: Next_Release --> v1.1.x

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks