You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nils Gerstner 8e4ffe5024
Add logger
2 years ago
..
README.md Add logger 2 years ago
controller.sh Add logger 2 years ago
logger.sh Add logger 2 years ago
writer.sh Add logger 2 years ago

README.md

LOGGER

Enrich command output for logging purpose. This works by sending stdout and stderr to named pipes. The content is read from the pipes and enriched before writing to a file. There are three enrichment examples in logger.sh:

  • plain text
  • json format
  • systemd journal

Usage

Add the commands you want to run in the ./writer.sh file. Start the process via ./controller.sh.

./controller.sh

The last command in ./writer.sh ensures that the named pipes get closed and removed in a save way!

echo "quit" >$pipe 2>$err_pipe