netbird/util
Jakub Kołodziejczak 24e031ab74
Fix syslog output containing duplicated timestamps (#2292)
```console
journalctl
```
```diff
- Jul 19 14:41:01 rpi /usr/bin/netbird[614]: 2024-07-19T14:41:01+02:00 ERRO %!s(<nil>): error while handling message of Peer [key: REDACTED] error: [wrongly addressed message REDACTED]
- Jul 19 21:53:03 rpi /usr/bin/netbird[614]: 2024-07-19T21:53:03+02:00 WARN %!s(<nil>): disconnected from the Signal service but will retry silently. Reason: rpc error: code = Internal desc = server closed the stream without sending trailers
- Jul 19 21:53:04 rpi /usr/bin/netbird[614]: 2024-07-19T21:53:04+02:00 INFO %!s(<nil>): connected to the Signal Service stream
- Jul 19 22:24:10 rpi /usr/bin/netbird[614]: 2024-07-19T22:24:10+02:00 WARN [error: read udp 192.168.1.11:48398->9.9.9.9:53: i/o timeout, upstream: 9.9.9.9:53] %!s(<nil>): got an error while connecting to upstream
+ Jul 19 14:41:01 rpi /usr/bin/netbird[614]: error while handling message of Peer [key: REDACTED] error: [wrongly addressed message REDACTED]
+ Jul 19 21:53:03 rpi /usr/bin/netbird[614]: disconnected from the Signal service but will retry silently. Reason: rpc error: code = Internal desc = server closed the stream without sending trailers
+ Jul 19 21:53:04 rpi /usr/bin/netbird[614]: connected to the Signal Service stream
+ Jul 19 22:24:10 rpi /usr/bin/netbird[614]: [error: read udp 192.168.1.11:48398->9.9.9.9:53: i/o timeout, upstream: 9.9.9.9:53] got an error while connecting to upstream
```

please notice that although log level is no longer present in the syslog
message it is still respected by syslog logger, so the log levels are
not lost:
```console
journalctl -p 3
```
```diff
- Jul 19 14:41:01 rpi /usr/bin/netbird[614]: 2024-07-19T14:41:01+02:00 ERRO %!s(<nil>): error while handling message of Peer [key: REDACTED] error: [wrongly addressed message REDACTED]
+ Jul 19 14:41:01 rpi /usr/bin/netbird[614]: error while handling message of Peer [key: REDACTED] error: [wrongly addressed message REDACTED]
```
2024-08-01 18:22:02 +02:00
..
grpc Wait on daemon down (#2279) 2024-07-17 16:26:06 +02:00
net Allow candidates on local routes if more specific than vpn routes (#2097) 2024-06-17 09:47:17 +02:00
common.go Disable SSH server by default on client side and add the flag --allow-server-ssh to enable it (#1508) 2024-02-20 11:13:27 +01:00
duration.go Turn credentials generation (#102) 2021-09-02 14:41:54 +02:00
file_test.go Allow to create config file next to binary (#701) 2023-02-28 17:01:38 +01:00
file.go Add context to throughout the project and update logging (#2209) 2024-07-03 11:33:02 +02:00
log.go Fix syslog output containing duplicated timestamps (#2292) 2024-08-01 18:22:02 +02:00
membership_unix.go Release 0.28.0 (#2092) 2024-06-13 13:24:24 +02:00
membership_windows.go NetBird SSH (#361) 2022-06-23 17:04:53 +02:00
retry.go Add gocritic linter (#1324) 2023-11-27 16:40:02 +01:00
syslog_nonwindows.go feat(client): send logs to syslog (#2259) 2024-07-16 10:19:58 +02:00
syslog_windows.go Refactor log util (#2276) 2024-07-16 11:50:35 +02:00
util_suite_test.go feature: basic management service implementation (#44) 2021-07-17 14:38:59 +02:00