Skip to content

Commit 406019a

Browse files
author
David Ripton
committed
Rename LOGNAME to LOGFILENAME.
LOGNAME has historically been used for the username. Using it for the logfile name causes confusion. For example, Python's getpass.getuser() will return the value of LOGNAME. Change-Id: I3f569d54f93c4898654fddb91f3b569831e75a2c
1 parent 0d71d1e commit 406019a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

stack.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,9 @@ if [[ -n "$LOGFILE" ]]; then
524524
# as the template to search for, appending '.*' to match the date
525525
# we added on earlier runs.
526526
LOGDIR=$(dirname "$LOGFILE")
527-
LOGNAME=$(basename "$LOGFILE")
527+
LOGFILENAME=$(basename "$LOGFILE")
528528
mkdir -p $LOGDIR
529-
find $LOGDIR -maxdepth 1 -name $LOGNAME.\* -mtime +$LOGDAYS -exec rm {} \;
529+
find $LOGDIR -maxdepth 1 -name $LOGFILENAME.\* -mtime +$LOGDAYS -exec rm {} \;
530530
LOGFILE=$LOGFILE.${CURRENT_LOG_TIME}
531531
SUMFILE=$LOGFILE.${CURRENT_LOG_TIME}.summary
532532

@@ -556,8 +556,8 @@ if [[ -n "$LOGFILE" ]]; then
556556

557557
echo_summary "stack.sh log $LOGFILE"
558558
# Specified logfile name always links to the most recent log
559-
ln -sf $LOGFILE $LOGDIR/$LOGNAME
560-
ln -sf $SUMFILE $LOGDIR/$LOGNAME.summary
559+
ln -sf $LOGFILE $LOGDIR/$LOGFILENAME
560+
ln -sf $SUMFILE $LOGDIR/$LOGFILENAME.summary
561561
else
562562
# Set up output redirection without log files
563563
# Copy stdout to fd 3

0 commit comments

Comments
 (0)