Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted
+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.

share|improve this answer
    
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 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 '13 at 10:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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