Skip to content

Commit

Permalink
Dont take message from stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
emmetog committed Oct 2, 2020
1 parent a8ec9cf commit 6b321f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions log
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ LSLOG () {
_LS_FIND_LEVEL_STR $LEVEL
local OUTPUT
eval "OUTPUT=\"$_LS_LEVEL_FMT\""
# if no message was passed, read it from STDIN
local _MSG
[[ $# -ne 0 ]] && _MSG="$@" || _MSG="$(cat)"
[[ $# -ne 0 ]] && _MSG="$@"
if [[ "$LS_OUTPUT" = "/dev/stdout" ]] ; then
echo -ne "$_LS_LEVEL_BEGIN$OUTPUT "
echo -n "$_MSG"
Expand Down

0 comments on commit 6b321f9

Please sign in to comment.