apache / logging-chainsaw

Apache Chainsaw is a GUI log viewer
http://logging.apache.org/chainsaw
Apache License 2.0
14 stars 10 forks source link

Suggestion: add container log support, as well as ANSI color removal #17

Open WesternGun opened 1 year ago

WesternGun commented 1 year ago

Oftentimes currently, the logs come from docker containers or docker compose, with ANSI color chars(cyan in my example):

app_1                        | 2023-01-09 19:59:02,911 DEBUG [org.apa.cam.pro.FilterProcessor]-{Camel (camel-1) thread #20 - Split}-Filter matches: true for exchange: Exchange[1B8CEEBBF0626A1-0000000000000007]

In that case, log4j patterns will not match, because it cannot understand ANSI color control chars, neither the app_1 | before each line. They mark the service name in docker-compose.yaml file.

It would be good to parse them, so that I don't have to find/replace them each time.

grobmeier commented 9 months ago

Hi, @WesternGun, this sounds like a very good idea. I am trying to get familiar with Chainsaw, and you could help me reproduce the issue. Can you create a demo container or Java classes that make exactly that log output?