I want to monitor a container log watching for specific text.
The app writes a lot of messages as it runs a process which could take anywhere from one to several hours.
ie: I’m trying to use:
docker logs mycontainer --follow
I have tried this:
docker logs mycontainer --follow --timestamps | ?{ $_ -like '*complete*' } | %{ ">>$($_)<<" }
I included the >> <<
in an attempt to highlight the interesting line.
It does highlight the interesting line, but there is also a lot of log messages printed that do not match '*complete*'
Possibly this is stdout -vs- stderr ?
There must be a better what of doing this. What am I missing? Help?