Skip to content

Commit c475f84

Browse files
committed
chore: remove caller name from log functions
not needed since the path file:line is already on each line
1 parent 1d4c48e commit c475f84

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/globals.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,15 @@ function log() {
8484
*) set -- "$level $@"; level="INFO" ;;
8585
esac
8686

87-
local caller_fn="${FUNCNAME[1]:-main}"
88-
echo "$(current_timestamp) [$level] ($caller_fn): $* #${BASH_SOURCE[1]}:${BASH_LINENO[0]}" >> "$BASHUNIT_DEV_LOG"
87+
echo "$(current_timestamp) [$level]: $* #${BASH_SOURCE[1]}:${BASH_LINENO[0]}" >> "$BASHUNIT_DEV_LOG"
8988
}
9089

9190
function internal_log() {
9291
if ! env::is_dev_mode_enabled || ! env::is_internal_log_enabled; then
9392
return
9493
fi
9594

96-
local caller_fn="${FUNCNAME[1]:-main}"
97-
echo "$(current_timestamp) [INTERNAL] ($caller_fn): $* #${BASH_SOURCE[1]}:${BASH_LINENO[0]}" >> "$BASHUNIT_DEV_LOG"
95+
echo "$(current_timestamp) [INTERNAL]: $* #${BASH_SOURCE[1]}:${BASH_LINENO[0]}" >> "$BASHUNIT_DEV_LOG"
9896
}
9997

10098
function print_line() {

0 commit comments

Comments
 (0)