Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am looking for a solution that would allow me to use color highlighting to a set of important output messages inside iTerm terminal application.

Things to highlight:

  • application logs file warnings, errors and fatals (apache, nginx, tomcat)
  • compiler output
  • other similar errors/warnings

enter image description here

share|improve this question
1  
what exactly is your question here? If it's the question in the title, what do you mean with "optimal"? –  patrix Sep 4 '12 at 13:15
    
Hmm - let me see if I can help - you have some of the answer in the question. As edited, it's still a bit too much in the category of "•every answer is equally valid: “What’s your favorite ______?” •your answer is provided along with the question, and you expect more answers: “I use ______ for ______, what do you use?” –  bmike Sep 4 '12 at 13:46

1 Answer 1

up vote 2 down vote accepted

iTerm supports coloring of console output based on a set of regular expressions. You can set them up in Preferences > Profiles > Advanced > Triggers > Edit.

Here is my current set of regexes:

(?i:.*error.*)                     // Yellow on Black
(?i:.*(warning|warn).*)            // Orange on Black
(?i:.*FATAL.*)                     // White on Red

iTerm regexes in a profile’s Triggers

You are welcome to improve it :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.