I would like to know if is possible to filter logs, only showing ERROR Level
kubectl logs -f -n the-namespace the-pod [LOG-LEVEL?]
in example ERROR
only
I was trying with:
kubectl logs -f -n bci-api the-pod | awk '{ if ($3 == "ERROR") { print } }'
The problem, are there some lines that are continuation of ERROR line and will be hidden!
Is it possible?
Thanks in advance!
can use grep functionality to filter errors from the entire logs
kubectl logs -f -n bci-api the-pod | grep -i 'Error'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With