Skip to content

Instantly share code, notes, and snippets.

@diegoquintanav
Created April 5, 2018 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diegoquintanav/f8f4ca31fbac2234ace3085b5599338c to your computer and use it in GitHub Desktop.
Save diegoquintanav/f8f4ca31fbac2234ace3085b5599338c to your computer and use it in GitHub Desktop.
Add time stamps and colors to logs

Appending a timestamp

$ tail -n 10 -f outputfile | xargs -IL date +"%Y%m%d_%H%M%S:L"

Using ccze

$ (tail -n 10 -f outputfile | xargs -IL date +"%Y%m%d_%H%M%S:L") | ccze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment