0

Running OpenVPN as a service, How do I redirect the log (which defaults saves to \program files\openvpn\log or if --log is specified) to windows event logger.

I don't want to store logs in more places than i absolutely have to and i can't find the specific parameter to do this (i could swear i've used it before but i'm stuck without access to any prior logs for quite a while).

1 Answer 1

0
+50

You can't just choose to write to the event log, unless the application supports it.

OpenVPN is currently writing to a file, whereas the event log is more like a database, which requires interaction through a Windows API.

OpenVPN would need to support writing to the Windows event log.

3
  • OpenVPN does that via openvpnservice.exe which reports errors to the eventlog that it encounters. There for i would assume that OpenVPN has this support built-in already..
    – Torxed
    Apr 16, 2013 at 11:06
  • The service / backend might, but that doesn't necessarily mean the client does. AFAIK, it doesn't currently.
    – Snellgrove
    Apr 24, 2013 at 5:21
  • Correct, it doesn't. I've come through the entire source code project for OpenVPN 2.2.2 and it doesn't have that support. it has syslog support but it's currently only tested and developed for Linux (meaning that you can't run it on Windows even if you have a syslog server like snare or syslog-ng). So i've re-written OpenVPN partially with log4cxx to give the support i was looking for.
    – Torxed
    Apr 24, 2013 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.