diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gobang.go | 15 |
1 files changed, 8 insertions, 7 deletions
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, )..., ) |