FAQ
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/QIfDMZ5Ssx

I 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.target


When I try to access to my log with:
systemctl start log_testing.service


Some 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


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 5 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedDec 16, '15 at 3:19p
activeDec 19, '15 at 11:28a
posts5
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase