Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include severity in log lines #490

Open
StyXman opened this issue Jan 27, 2024 · 3 comments
Open

Include severity in log lines #490

StyXman opened this issue Jan 27, 2024 · 3 comments

Comments

@StyXman
Copy link

StyXman commented Jan 27, 2024

Describe the bug

This is a wish. When writing logs, please include severity.

To Reproduce

mdione@lugburz:~$ sudo openvpn AWS-OVH-client.conf
2024-01-27 11:24:16 DEPRECATED OPTION: The option --secret is deprecated.
2024-01-27 11:24:16 DEPRECATION: No tls-client or tls-server option in configuration detected. OpenVPN 2.7 will remove the functionality to run a VPN without TLS. See the examples section in the manual page for examples of a similar quick setup with peer-fingerprint.
2024-01-27 11:24:16 OpenVPN 2.6.3 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] [DCO]
2024-01-27 11:24:16 library versions: OpenSSL 3.0.11 19 Sep 2023, LZO 2.10
2024-01-27 11:24:16 DCO version: N/A
2024-01-27 11:24:16 Cipher BF-CBC not supported
2024-01-27 11:24:16 Exiting due to fatal error

Expected behavior
I can't tell which is the error. The first two lines are probably warnings, then a couple of info lines, then an error, then either info or error.

Version information (please complete the following information):

  • OS: Debian bookworm/stable
  • OpenVPN version: 2.6.3
@selvanair
Copy link
Contributor

Log sent to syslog has some error-level information (ERROR, WARNING, NOTICE). The management also gets flags indicating the error type. Including it in the console/file log as well looks useful.

@schwabe
Copy link
Contributor

schwabe commented Feb 11, 2024

We also have an option to enable better parsable log output

@selvanair
Copy link
Contributor

selvanair commented Feb 15, 2024

We also have an option to enable better parsable log output

Unforunately --machine-readable-output prints flags as a number (hex) that makes sense only internally to OpenVPN (like M_ERRNO|M_NONFATAL = 120 in hex).

That said, parsing only the first high nibble of the last byte of flags may be enough for most users, so documenting that could be a way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants