Skip to content

Commit 18956ca

Browse files
JAORMXdmjb
andauthored
redirect Squid access logs to stdout (#888)
## Summary This PR modifies the Squid proxy configuration to redirect access logs to standard output instead of writing to a file within the container. ## Changes - Changed `access_log` configuration from `stdio:/var/log/squid/access.log` to `stdio:/dev/stdout` - Applied to both egress and ingress proxy configurations in `pkg/container/docker/squid.go` ## Benefits - Access logs are now properly captured by container logging systems - Logs are accessible through standard Docker/Podman log commands - Better integration with container orchestration platforms - Follows container best practices for logging Co-authored-by: Don Browne <[email protected]>
1 parent 94327d9 commit 18956ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/container/docker/squid.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func createTempSquidConf(
169169
sb.WriteString(
170170
"http_port 3128\n" +
171171
"visible_hostname " + serverHostname + "-egress\n" +
172-
"access_log stdio:/var/log/squid/access.log squid\n" +
172+
"access_log stdio:/dev/stdout squid\n" +
173173
"pid_filename /tmp/squid.pid\n" +
174174
"# Disable memory and disk caching\n" +
175175
"cache deny all\n" +
@@ -268,7 +268,7 @@ func createTempIngressSquidConf(
268268

269269
sb.WriteString(
270270
"visible_hostname " + serverHostname + "-ingress\n" +
271-
"access_log stdio:/var/log/squid/access.log squid\n" +
271+
"access_log stdio:/dev/stdout squid\n" +
272272
"pid_filename /tmp/squid.pid\n" +
273273
"# Disable memory and disk caching\n" +
274274
"cache deny all\n" +

0 commit comments

Comments
 (0)