The tail command is frequently used to monitor log files. In this short tutorial, we'll discuss approaches to augmenting tail 's output with colors to highlight important information conveyed by log files. Another solution, if you're on a server where it's inconvenient to install non- standard tools, is to combine tail.
What I would like to do is craft something that would highlight WARN in yellow and ERROR in red, and MicroKernel in green. I tried just piping grep --color=auto multiple times, but the only color that survives is the last command in the pipe. Is there a one liner to do this? Or even a many-liner? Any specific output program? It depends on the program sending the data through the pipe.
head, tail, etc aren't the ones removing the colors, it's the program generating the data that usually check if the output is going to the console (colored), a file or pipe (not colored). Color output of linux tail command. GitHub Gist: instantly share code, notes, and snippets.
I use the linux tail command to view an application log output. A lot of output is generated. I want the tail output to display in different colors: WARN=yellow, ERROR=red I was trying to add environment variables or add to my bash script to accomplish this, but I have not found anything that will accomplish this.
Monitoring apache logs with tail -f tends gets very frustrating for the eyes after a while. Are there any tool/options to colorize the log outputs? Maybe signal FATAL with red, etc. How to get colored output with tail command [duplicate] Ask Question Asked 7 years, 6 months ago Modified 6 years, 4 months ago.
How to have tail -f show colored output In the morning, I saw a friend curl a weather forecast HTTP resource on the shell terminal and found that the output text is colored, which inspired my interest in outputting colored text logs in the terminal to enhance readability. The command: watch -d tail /your/file/here will display the file and highlight the differences character by character. Note that you do not want to use the -f option in this case.
Ubuntu has it. For OSX, you can can use brew install watch if you have homebrew installed or sudo ports install watch if you use ports.