From 9d98bec0546c0b90f4795c0340b41825b14d8e1d Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 25 Sep 2024 22:51:21 -0300 Subject: src/gobang.go: Put sourceInfo skip level into private const --- src/gobang.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/gobang.go') diff --git a/src/gobang.go b/src/gobang.go index 9d544c9..f135aa3 100644 --- a/src/gobang.go +++ b/src/gobang.go @@ -122,6 +122,7 @@ func anyArr[S ~[]E, E any](arr S) []any { return ret } +const sourceInfoSkip = 3 func Debug(message string, type_ string, args ...any) { if level < LevelDebug { return @@ -131,7 +132,7 @@ func Debug(message string, type_ string, args ...any) { message, slices.Concat( anyArr(logArgs(type_)), - []any { sourceInfo(3) }, + []any { sourceInfo(sourceInfoSkip) }, args, )..., ) @@ -146,7 +147,7 @@ func Info(message string, type_ string, args ...any) { message, slices.Concat( anyArr(logArgs(type_)), - []any { sourceInfo(3) }, + []any { sourceInfo(sourceInfoSkip) }, args, )..., ) @@ -161,7 +162,7 @@ func Warning(message string, type_ string, args ...any) { message, slices.Concat( anyArr(logArgs(type_)), - []any { sourceInfo(3) }, + []any { sourceInfo(sourceInfoSkip) }, args, )..., ) @@ -176,7 +177,7 @@ func Error(message string, type_ string, args ...any) { message, slices.Concat( anyArr(logArgs(type_)), - []any { sourceInfo(3) }, + []any { sourceInfo(sourceInfoSkip) }, args, )..., ) @@ -196,7 +197,7 @@ func metric(type_ string, label string, args ...any) { "type", type_, "label", label, }, - []any { sourceInfo(3) }, + []any { sourceInfo(sourceInfoSkip) }, args, )..., ) -- cgit v1.2.3