File tree Expand file tree Collapse file tree
ansible/roles/bash_aliases/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,14 +10,14 @@ logpath() {
1010
1111logtail() {
1212 local app_name="$1"
13- tail -f $(logpath ${app_name}) | bunyan
13+ tail -f " $(logpath ${app_name})" | bunyan
1414}
1515
1616# Follows the logfile for a given app_name interpolating the datetime string into the logpath (/var/log/runnable/YYYY/MM/DD/HH/<app _name >.log)
1717# Usage: lograw <app _name >
1818lograw() {
1919 local app_name="$1"
20- tail -f $(logpath ${app_name})
20+ tail -f " $(logpath ${app_name})"
2121}
2222
2323# Just display the last few lines of a log (2nd arg specifies # of lines or tail default if left blank)
@@ -29,7 +29,7 @@ loglast() {
2929 if [ 2 -eq "{{ '${#}' }}" ] ; then
3030 tailopts="-${2}"
3131 fi
32- tail ${tailopts} $(logpath ${app_name}) | bunyan
32+ tail " ${tailopts}" " $(logpath ${app_name})" | bunyan
3333}
3434
3535# Follow a log, grep for "${regexp}"
@@ -41,11 +41,11 @@ greplog() {
4141 if [ 2 -eq "{{ '${#}' }}" ] ; then
4242 regexp="${2}"
4343 fi
44- tail -f $(logpath ${app_name}) | grep ${regexp} | bunyan
44+ tail -f " $(logpath ${app_name})" | grep " ${regexp}" | bunyan
4545}
4646
4747# Outputs contents of an npm start log for <app _name >, if it exists, into a pager for reading.
4848# Usage: npmlog <app _name >
4949npmlog() {
50- less $(logpath ${app_name})
50+ less " $(logpath ${app_name})"
5151}
You can’t perform that action at this time.
0 commit comments