I have a program which is started by systemd service myprogram.service
. Problem is that it is writing its logs directly to the log file /opt/myprogram/logs.txt
. I want to redirect its logs into systemd journal, so I will be able to read them with journalctl
.
Is it possible to amend myprogram.service
to tell Systemd to pipeline text from specific file into its journal?
--no-daemon
(or similar) flag.--syslog
switch.