Skip to content

Commit d03aadb

Browse files
author
Christopher M. Neill
committed
normalize comments per style standards
1 parent 56e87a7 commit d03aadb

2 files changed

Lines changed: 8 additions & 22 deletions

File tree

ansible/roles/bash_aliases/templates/dot_bash_aliases.sh.j2

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
1-
# not really an alias
2-
function logtail() {
1+
# 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
32
# Usage: logtail <app_name>
4-
# Name of the app log you wish you view, eg: api, navi, docker-listener, swarm-manager
3+
function logtail() {
54
local app_name="$1"
6-
# string of the current year, month, day and hour in YYYY/MM/DD/HH format
75
local datetime=`date +%Y/%m/%d/%H`
8-
# location of application logs specified in ansible configuration
96
local app_log_dir="{{ app_log_dir }}"
10-
# concatenate this strings to derive the full log path
117
local logfile="${app_log_dir}/${datetime}/${app_name}.log"
12-
# follow logfile, format via bunyan
138
tail -f ${logfile} | bunyan
149
}
1510

16-
function npmlog() {
11+
# Outputs contents of an npm start log for <app_name>, if it exists, into a pager for reading.
1712
# Usage: npmlog <app_name>
18-
# Name of the app npm log you wish to view.
13+
function npmlog() {
1914
local app_name="$1"
20-
# system log dir
2115
local app_log_dir="/var/log"
22-
# npm log
2316
local logfile="${app_log_dir}/${app_name}.log"
2417
less ${logfile}
2518
}

ansible/roles/bash_aliases/templates/dot_bash_aliases_root.sh.j2

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
1-
# not really an alias
2-
function logtail() {
1+
# 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
32
# Usage: logtail <app_name>
4-
# Name of the app log you wish you view, eg: api, navi, docker-listener, swarm-manager
3+
function logtail() {
54
local app_name="$1"
6-
# string of the current year, month, day and hour in YYYY/MM/DD/HH format
75
local datetime=`date +%Y/%m/%d/%H`
8-
# location of application logs specified in ansible configuration
96
local app_log_dir="{{ app_log_dir }}"
10-
# concatenate this strings to derive the full log path
117
local logfile="${app_log_dir}/${datetime}/${app_name}.log"
12-
# follow logfile, format via bunyan
138
tail -f ${logfile} | bunyan
149
}
1510

16-
function npmlog() {
11+
# Outputs contents of an npm start log for <app_name>, if it exists, into a pager for reading.
1712
# Usage: npmlog <app_name>
18-
# Name of the app npm log you wish to view.
13+
function npmlog() {
1914
local app_name="$1"
20-
# system log dir
2115
local app_log_dir="/var/log"
22-
# npm log
2316
local logfile="${app_log_dir}/${app_name}.log"
2417
less ${logfile}
2518
}

0 commit comments

Comments
 (0)