Score:0

Redirect legacy logfile to systemd journal

ru flag
jdm

I have a program that logs to two configurable logfiles. The file names are given in a configuration file, and not via command line parameter (which is the case in this similiar question). How can I get the log output to show up in the systemd journal (journalctl)?

I can imagine either systemd would monitor the logfile, or I create a unix socket and use that as my logfile? This seems a common use case, is there a directive in the service file I need to know?

I am hesitant to just use /dev/stdout as the filename, as I'm not sure the process will deal with it correctly. And I can't use bash process substitution (myapp --log-file >(systemd-cat)) as the log file is not passed via command line.

In case it matters, the program is the IBM DSM client (formerly TSM), and I'm right now using the original systemd service file.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.