eduvpn / eduvpn-common

Code to be shared between eduVPN clients
MIT License
5 stars 3 forks source link

V2: possible logging approaches #14

Open jwijenbergh opened 1 year ago

jwijenbergh commented 1 year ago

Two options for logging

jwijenbergh commented 1 year ago

from @fkooman: syslog might be nice so a logging callback might be better?

rozmansi commented 1 year ago

One thing is definite: we need to combine logging! There's one log from VPN connection (OpenVPN/WireGuard), one log from eduvpn-common, the eduVPN client for Windows is not even logging to a file but to the OutputDebugString()... Helpdesk is going to kill us if we don't unite this.

  1. While OpenVPN and WireGuard already allow tapping into their log, eduvpn-common does not.
  2. The client is the glue that holds together eduvpn-common and OpenVPN/WireGuard.
  3. Client is platform specific, eduvpn-common is not - on purpose. Log writing is platform specific.

Given all the above, a logging callback letting the client combine log sources and implement the writing to syslog/file/NT EventLog/whatever seems the most reasonable approach.

OTOH, All platforms need logging implemented. Implementing it in eduvpn-common platform-specific internally and offering it as a platform-agnostic API could be the way to "go". Also, less work for me. 😇

So, it all comes down to who will we decide to delegate logging implementation to.