Hello all,
I try to delegate the log to systemd/journald?
I write this simple test go program that log into STDOUT:
http://play.golang.org/p/QIfDMZ5SsxI use this systemd unit file:
[Unit]
Description=log testing
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/tmp/log_testing
WorkingDirectory=/tmp/
[Install]
WantedBy=multi-user.targetWhen I try to access to my log with:
systemctl start log_testing.serviceSome log line seems to be missing:
déc. 15 16:34:32 ... log_testing[29722]: 0
déc. 15 16:34:32 ... log_testing[29722]: 1
déc. 15 16:34:32 ... log_testing[29722]: 2
déc. 15 16:34:32 ... log_testing[29722]: 3
déc. 15 16:34:32 ... log_testing[29722]: 4
déc. 15 16:34:32 ... log_testing[29722]: 5
déc. 15 16:34:32 ... log_testing[29722]: 6
déc. 15 16:34:32 ... log_testing[29722]: 7
déc. 15 16:34:32 ... log_testing[29722]: 8
déc. 15 16:34:32 ... log_testing[29722]: 9
déc. 15 16:34:32 ... log_testing[29722]: 10
... no missing log between 10 and 995 ...
déc. 15 16:34:37 ... log_testing[29722]: 995
déc. 15 16:34:37 ... log_testing[29722]: 996
déc. 15 16:34:37 ... log_testing[29722]: 997
déc. 15 16:34:37 ... log_testing[29722]: 998
déc. 15 16:34:37 ... log_testing[29722]: 999
déc. 15 16:34:37 ... log_testing[29722]: 1000
déc. 15 16:35:02 ... log_testing[29722]: 5841 <-- here, it is not expected number (so missing lines from 1001 to 5840)
déc. 15 16:35:02 ... log_testing[29722]: 5842
déc. 15 16:35:02 ... log_testing[29722]: 5843
déc. 15 16:35:02 ... log_testing[29722]: 5844
déc. 15 16:35:02 ... log_testing[29722]: 5845
déc. 15 16:35:02 ... log_testing[29722]: 5846
déc. 15 16:35:02 ... log_testing[29722]: 5847
Has someone already use systemd/journald with golang for managing the application log?
If yes, how can I see all the log? not only slice of 1000 lines?
Thx in adv