I'm building a docker container with nginx and certbot embedded.
I want to be able to log the output from nginx and cerbot using journald on the host.
The nginx output already goes to the console and the host journald is working fine for this output.
My problem is that I need the ability to send the following files to journald. I want to be able to tail these files on the host so it needs to be sent in realtime.
The files are:
access.log
error.log
letsencrypt.log
certbot (letsencrypt) doesn't appear to provide any alternative except to write to the log file.
So I guess I'm looking from some process to tail the above log files and then send the output to the console.
Given that nginx is already attached to the console the only option I can think of is to have a main thread spool up a no. of threads, one for each process/file and then send all the the output from the above files to the 'main' thread which would then output these to the console.
I'm hoping there is an easier way forward.
Give following a try:
/dev/stdout
in container