taskserver icon indicating copy to clipboard operation
taskserver copied to clipboard

[TD-137] Allow taskd to log directly to remote syslog server

Open taskwarrior opened this issue 7 years ago • 4 comments

Nick Bastin on 2017-10-23T19:22:35Z says:

taskd could easily allow for logging to a user-specific syslog server over UDP, which would make it much easier to use in environments with central log stores.  The current implementation requires installing a log broker which can monitor the log file and relay the messages, which takes both IOPS and CPU (and also only efficiently works on systems with inotify).

taskwarrior avatar Feb 12 '18 01:02 taskwarrior

Migrated metadata:

Created: 2017-10-23T19:22:35Z
Modified: 2017-12-03T01:52:53Z

taskwarrior avatar Feb 12 '18 01:02 taskwarrior

Paul Beckingham on 2017-12-02T19:14:29Z says:

Interesting, but not plans to do this.

 

Could this not be achieved by logging to stdout, then rerouting yourself?

taskwarrior avatar Feb 12 '18 01:02 taskwarrior

Nick Bastin on 2017-12-03T01:52:53Z says:

That's a bit more efficient than writing to a monitored file, but still requires a broker (of which the well maintained ones are not very lean, all things considered).  It would be most efficient to just open a UDP socket and fire messages on it.

I'm planning on putting together a patch for this over the holidays, but that'll be a few weeks still.

taskwarrior avatar Feb 12 '18 01:02 taskwarrior

With systemd I am currently using /dev/stdout as a log file (log=/dev/stdout in config) to reroute all the logs to stdout and then have systemd collect them. To log to a centralized syslog instead, you should be able to do it with log=/dev/stdout and:

$ taskd | logger --udp --server your-logging-server.local

dev-zero avatar Oct 09 '18 10:10 dev-zero