OpenLiberty / ci.ant

Ant tasks for managing Liberty profile server instances #devops
Apache License 2.0
8 stars 36 forks source link

Log errors and warnings correctly #160

Closed cherylking closed 1 year ago

cherylking commented 1 year ago

Needed for https://github.com/OpenLiberty/ci.maven/issues/1680.

Note that this will only work if the Liberty server messages are in English, since I am looking for [ERROR or [WARN in the line getting logged. When we add globalization for this plugin, this is something that would need to be fixed. If the message is not in English, it will get logged as an INFO message as it already does currently.

cherylking commented 1 year ago

With this change, the console output looks like the following for the Liberty Maven plugin.

Screenshot 2023-05-30 at 12 58 36 PM
scottkurz commented 1 year ago

I wonder about this design vs. the variation of leaving the "outer" messages logged by mvn at INFO level and reaching into the inner messages issued by the Liberty runtime and wrapping them with color escaping. Also think it could be worth doing this coloring in the Liberty runtime itself, though could be worth working around in the meantime.

evie-lau commented 1 year ago

Closed with #163