freelan-developers / freelan

The main freelan repository.
http://www.freelan.org
Other
1.35k stars 201 forks source link

syslog without timestamps #211

Closed HenryNe closed 4 years ago

HenryNe commented 4 years ago

Syslog should not logged with timestamps. Maybe the detection of option "syslog" should moved up before loading certs.

Syslog under linux:

# journalctl -t freelan

Feb 28 09:26:45 node1 freelan[554]: Starting freelan - peer-to-peer virtual private network daemon:.
Feb 28 09:26:45 node1 freelan[554]: Starting freelan instance - freelan:2020-02-28T09:26:45.738262 [INFORMATION] Reading configuration file at: "/etc/freelan/freelan.conf"
Feb 28 09:26:45 node1 freelan[554]: 2020-02-28T09:26:45.777170 [INFORMATION] Loaded signature certificate from: "/etc/freelan/node1.crt"
Feb 28 09:26:45 node1 freelan[554]: 2020-02-28T09:26:45.779087 [INFORMATION] Loaded signature private key from: "/etc/freelan/node1.key"
Feb 28 09:26:45 node1 freelan[554]: 2020-02-28T09:26:45.781833 [INFORMATION] Loaded authority certificate from: "/etc/freelan/ca.crt"
Feb 28 09:26:45 node1 freelan[554]: 2020-02-28T09:26:45.789329 [INFORMATION] Creating PID file at: "/var/run/freelan.pid.freelan"
Feb 28 09:26:45 node1 freelan[554]: .
Feb 28 09:26:45 node1 freelan[699]: Enabling certificate-based authentication.
Feb 28 09:26:45 node1 freelan[699]: Starting FSCP server...

Started via start-stop-daemon with option DAEMON_ARGS="--syslog". The running task in processlist is: /usr/sbin/freelan --syslog -p /var/run/freelan.pid.freelan -c /etc/freelan/freelan.conf

Build from source release 2.2:

# freelan --version
freelan 2.2.0 (<unspecified version>) Fri 28 Feb 2020
s-vincent commented 4 years ago

Hello,

Thanks for your reports.

I made a change in revision af6fd71b4ddec9a4afd4415fd85c4f8a0d17dc0c that fix this behavior.

HenryNe commented 4 years ago

Thanks a lot. I confirm, it's fixed now.