From 635bf2100c4efeae179b6a5ea0028424e985cc0a Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 27 Sep 2024 15:10:50 -0300 Subject: src/gobang.go: Turn private sourceInfoSkip const into public SourceInfoSkip variable --- src/gobang.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/gobang.go') diff --git a/src/gobang.go b/src/gobang.go index fab8392..f13fc80 100644 --- a/src/gobang.go +++ b/src/gobang.go @@ -48,8 +48,10 @@ type CopyResult struct { var ( level LogLevel = LevelInfo - emitMetric bool = true + emitMetric = true hostname string + + SourceInfoSkip = 3 ) @@ -117,7 +119,6 @@ func anyArr[S ~[]E, E any](arr S) []any { return ret } -const sourceInfoSkip = 4 func Debug(message string, type_ string, args ...any) { if level < LevelDebug { return @@ -127,7 +128,7 @@ func Debug(message string, type_ string, args ...any) { message, slices.Concat( anyArr(logArgs(type_)), - []any { sourceInfo(sourceInfoSkip) }, + []any { sourceInfo(SourceInfoSkip) }, args, )..., ) @@ -142,7 +143,7 @@ func Info(message string, type_ string, args ...any) { message, slices.Concat( anyArr(logArgs(type_)), - []any { sourceInfo(sourceInfoSkip) }, + []any { sourceInfo(SourceInfoSkip) }, args, )..., ) @@ -157,7 +158,7 @@ func Warning(message string, type_ string, args ...any) { message, slices.Concat( anyArr(logArgs(type_)), - []any { sourceInfo(sourceInfoSkip) }, + []any { sourceInfo(SourceInfoSkip) }, args, )..., ) @@ -172,7 +173,7 @@ func Error(message string, type_ string, args ...any) { message, slices.Concat( anyArr(logArgs(type_)), - []any { sourceInfo(sourceInfoSkip) }, + []any { sourceInfo(SourceInfoSkip) }, args, )..., ) @@ -192,7 +193,7 @@ func metric(type_ string, label string, args ...any) { "type", type_, "label", label, }, - []any { sourceInfo(sourceInfoSkip) }, + []any { sourceInfo(SourceInfoSkip) }, args, )..., ) -- cgit v1.2.3