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

netbird: send logs to syslog #24972

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

LuisMitaHL
Copy link

Netbird writes logs to persistent storage by default on /var/log/netbird/client.log. This change aligns the behavior of logs to other services in OpenWrt, whose logs are sent to syslog.

Maintainer: @oskarirauta
Compile tested: Confiabits MT7981, SNAPSHOT r27350-c4a9265160
Run tested: Confiabits MT7981, SNAPSHOT r27350-c4a9265160

@wehagy
Copy link
Contributor

wehagy commented Sep 15, 2024

Bump PKG_RELEASE

PKG_RELEASE:=1

@1715173329
Copy link
Member

Not all services send their logs to syslog and it's not forced. I'm not sure if it will "pollute" syslog.
/var/log is actually in memory and used by other services too.

@wehagy
Copy link
Contributor

wehagy commented Sep 16, 2024

Good point, I can see how much "noise" netbird produces, but anyway I think is good to have this option, maybe by default disabled, but can be enabled via uci config, sometimes I'm trying to debug, and is a little bit of pain logread -fe <put a service here> and tail -f /var/log/netbird/client.log, is good to have everything unified, what can be make too is change the log level to warning or error, default is info.

The option to change the log location is nice to have too.

@LuisMitaHL
Copy link
Author

LuisMitaHL commented Sep 21, 2024

I didn't realize that /var is in RAM. Good to know, no need to worry about flash wear.

I created the PR because, as a consequence of a bug with openwrt and mwan3 (netbirdio/netbird#2116) the service was generating errors continuously and the log file had grown a lot in several days.
I believe that if the logs were in syslog, the error would be more obvious and the process could have been stopped earlier.

Also this behavior aligns with the existing behavior of other similar software, such as tailscale.

Netbird writes logs to persistent storage by default on /var/log/netbird/client.log.
This change aligns the behavior of logs to other services in OpenWrt, whose logs are sent to syslog.

Signed-off-by: Luis Mita <[email protected]>
@LuisMitaHL
Copy link
Author

Bump PKG_RELEASE

PKG_RELEASE:=1

Done, thanks

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

Successfully merging this pull request may close these issues.

3 participants