Help colorizing log files

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Michael Hinkle

Help colorizing log files

Post by Michael Hinkle »

I deal with a set of log files with entries that follow the basic format described below:
[Contacts |WCMSD |03FC|W] 2002/12/03 20:06:52:480 Message
[Events |WCallMgrD |02A8|I] 2002/12/03 20:06:52:480 Message

The key character in all the entries is the last one in the [] set. I = Informational, W = Warning, and E = Error. What I would like to be able to do is set up a .syn file that would make any line that contained the string |E] red. All I have found is a way to make keywords colored. Is there a way to color a line based on a string in that line?

Thanks,
Michael
Berend

Re: Help colorizing log files

Post by Berend »

Not a real solution, but it's close. You can use
SingleComment = |E]
and set the color for comments to red. At least everything *after* |E] will be red. If you want you can also use
SingleCommentAlt = |W] to show warnings.

Berend
Post Reply