How can I highlight the warning and error lines in the make output?

前端 未结 7 2099
醉话见心
醉话见心 2021-01-30 11:19

Sometimes, make\'s output fills the screen. It\'s a little bit hard to identify all the warning and error message lines. I know may shell color output can help Can anyone can he

7条回答
  •  梦毁少年i
    2021-01-30 11:35

    I have came to this questions searching for a solution to colorize make output and then remembered a while back I have researched a good generic log colorizer and found ccze. It works with anything I throw at it from Minecraft server logs to Exim MTA.

    make | ccze -A

    NOTE: specifying -A option enables 'raw-ansi' otherwise some output is 'cleared' at end of run in my experience. enter image description here

提交回复
热议问题