A practical walkthrough of using the `tee` command combined with bash process substitution to simultaneously send a Java process's full stdout to Kubernetes logging infrastructure while writing only filtered lines (e.g., OutOfMemoryError events) to a log file. Explains how `>(commands)` process substitution works under the hood via /dev/fd and anonymous pipes, with a Java code example that reads from a file descriptor to illustrate the mechanism.

3m read timeFrom morling.dev
Post cover image

Sort: