CobaltFusion / DebugViewPP

DebugView++, collects, views, filters your application logs, and highlights information that is important to you!
Boost Software License 1.0
982 stars 144 forks source link

Support for ANSI TTY Esc Colorization Codes #327

Open smallscript opened 6 years ago

smallscript commented 6 years ago

Do you think it is reasonable/feasible to have it auto-detect ANSI TTY color codes and both hide the ANSI TTY codes and use them to colorize the text.

That would be awesome for simply streaming stderr console output and other similarly embedded pre-colorized streams of data. My language engine ts-lang (tcl+javascript) generates this kind of telemetry channel data for headless apps and I have found DebugViewPP to be awesome. When I worked at Microsoft I had a similar log filtering and colorization tool.

One possible option would be to enable a plug-in that would act like reg-ex for Token but auto-detect ANSI color codes (they are trivial patterns) and then filter them out colorizing the text. But it really depends on how the DVP layout engine is setting up color information before rendering the text. I would assume the issue at hand is "range" to apply the modification to, and ordering of when to apply this filter versus other filters. But it may also require some special work to "hide" the esc-codes. It would actually be really cool if the Token-regex could "rewrite" the token string and set its color. Then no special plug would be required at all. You could just define some basic colorization rules for the escape patterns. But that would require the ability to "rewrite" the token before it was rendered.

Ideally such a "token-rewrite" would only transiently change the rendering, not actually alter the retained content if one turned it off or saved the log file.

I might be interested in doing the work, but would like to know if the author(s) think it is feasible. See previous comments on this And this for Visual Studio with these comments

janwilmans commented 6 years ago

There has been similar requests and its certainly doable. However I'm trying to figure out a new project : debugvizualizer https://github.com/CobaltFusion/DebugVisualizer and I'm more inclined to spend time on that.

This feature you are talking about could be part so its design...

Would you be interested to help design it?

Greetings,

Jan

On Sat, Jul 14, 2018, 05:42 smallscript notifications@github.com wrote:

Do you think it is reasonable/feasible to have it auto-detect ANSI TTY color codes and both hide the ANSI TTY codes and use them to colorize the text.

That would be awesome for simply streaming stderr console output and other similarly embedded pre-colorized streams of data.

I might be interested in doing the work, but would like to know if the author(s) think it is feasible.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CobaltFusion/DebugViewPP/issues/327, or mute the thread https://github.com/notifications/unsubscribe-auth/AFqJhPLUgPPRPIoAo9gfp3oFTETIvdk2ks5uGWiugaJpZM4VPtgw .