New shell alias for #logs. It `tail`s any file in the current directory that ends in '.log' or is in a folder called 'log' (recursively). Hidden files from git/svn are ignored.
6+ y ago
Tue May 22 2018
So does not yield a new line... the alias is: tail -f $(find . -type d -name "*log*" -not -path "*.git*" -not -path "*.svn*")/* $(find . -type f -name "*.log")
#ask - how to make this more comprehensive? what are other common log file names/locations?
This is pretty cool, Sean. Will it work if there are multiple log files in a directory? Iām thinking about Rails instances where you have development.log, prod.log, etc.
6+ y ago
Tue May 22 2018
Yep! I've improved it a bit again. So basically it looks for any file in the current dir and below that ends in '.log' or any file that is in a folder called 'log' or 'logs' (excluding scm/node_modules/zip files). It passes all of them to `tail`, which accepts multiple files. So one command, see all the logs w/out even looking. Here's what it looks like: https://i.imgur.com/Ow4ZxLg.png. And the latest update: bash - https://goo.gl/hZn2J8 fish - https://goo.gl/hY1Yhm.
6+ y ago
Tue May 22 2018
That's pretty awesome Sean! Will give it a whirl ā I'm always messing with my log output screens so this will be fun to try. I usually have a tmux pane just spitting out the tail output on my various projects. Good stuff!
6+ y ago
Tue May 22 2018
Thanks, glad it's useful! I actually thought of it while creating tmuxinator templates