openfaas / of-watchdog

Reverse proxy for STDIO and HTTP microservices
MIT License
262 stars 115 forks source link

Add mechanism to disable prefixes to function logs #121

Closed alexellis closed 3 years ago

alexellis commented 3 years ago

Signed-off-by: Alex Ellis (OpenFaaS Ltd) alexellis2@gmail.com

Description

Add mechanism to disable prefixes to function logs, so that end-users can write log lines in JSON and ingest them into a log aggregation tool, without having to do additional parsing or trimming.

Motivation and Context

This patch allows users to disable any prefix of date/time and the text such as stderr or stdout which showed users what kind of stream the log statement came from.

Whilst making changes, I removed the afterburner mode which has been long deprecated.

Fixes: #75 #82 #72

How Has This Been Tested?

This was tested in HTTP mode with the watchdog running outside of a container with Node.js printing two statements - one from stderr and one from stdout. As expected, when the new flag was toggled, neither had a prefix.

Types of changes

Checklist: