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).

Torxed
  • 225
  • 1
  • 5
  • 18

1 Answers1

0

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.

Snellgrove
  • 712
  • 4
  • 14
  • 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 '13 at 11:06
  • The service / backend might, but that doesn't necessarily mean the client does. AFAIK, it doesn't currently. – Snellgrove Apr 24 '13 at 05: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 '13 at 10:08