Closed klaernie closed 1 year ago
Forgot to mention: I wouldn't be offended at all if you'd deem this PR as non-mergeable, I'm very well aware that this change might not fit the overall structure or style.
looks ok to me, maybe you could mention the various logfile options in the ini example file?
Oh, right, totally forgot that I wanted to do that. Lemme do that!
sorry for the force push - just noticed that I typoed in the documentation
no worries, haven't merged it yet :-)
thanks
This is a very naive attempt at making the log output configurable to not output colors, and skip the date/time, since these would be provided by journald anyway.
I'm pretty sure that this is not the optimal way to implement it, but I wanted to run this in production (I'm currently setting up a local lmd on each of our worker processes, to replace the xinetd-alike unixcat approach of accessing the livestatus unix socket via tcp/ip). In our production environment we use filebeat to transport the journal to a central instance, and I wanted to avoid having to strip ansi-escape-sequences in filebeat.
The better approach probably needs more config options to enable/disable datetime logging and colors separately from each other, or autodetects if the output goes to a terminal to enable colors (
test -t 1
). Once might also argue that native journald logging would be better, but also that's way beyond my golang skills.