Skip to content

Commit a1d80f7

Browse files
committed
Update README with regex example for log ignore path
1 parent bc3afb2 commit a1d80f7

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,22 +116,13 @@ In the log output set the environment variable `DISABLE_REQUEST_LOGS` to true, t
116116

117117
## Do not log specific path
118118

119-
Set the environment variable `LOG_IGNORE_PATH` to a path you would like to exclude from verbose logging to stdout.
119+
Set the environment variable `LOG_IGNORE_PATH` to a path or a regex you would like to exclude from verbose logging to stdout.
120120
This can help reduce noise from healthchecks in orchestration/infrastructure like Swarm, Kubernetes, ALBs, etc.
121121

122122
docker run -e LOG_IGNORE_PATH=/ping -p 8080:8080 -p 8443:8443 --rm -t mendhak/http-https-echo:36
123+
docker run -e LOG_IGNORE_PATH="^\/ping|^\/health|^\/metrics" -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo:36
123124

124125

125-
With docker compose, this would be:
126-
127-
my-http-listener:
128-
image: mendhak/http-https-echo:36
129-
environment:
130-
- LOG_IGNORE_PATH=/ping
131-
ports:
132-
- "8080:8080"
133-
- "8443:8443"
134-
135126

136127
## JSON payloads and JSON output
137128

0 commit comments

Comments
 (0)