diff options
author | EuAndreh <eu@euandre.org> | 2024-09-25 22:51:21 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-09-25 22:51:21 -0300 |
commit | 9d98bec0546c0b90f4795c0340b41825b14d8e1d (patch) | |
tree | e01c10f9538ff0bf62ed589e56926c18a4c3eccc /src/gobang.go | |
parent | src/gobang.go: Remove return value from Timed() thunk (diff) | |
download | gobang-9d98bec0546c0b90f4795c0340b41825b14d8e1d.tar.gz gobang-9d98bec0546c0b90f4795c0340b41825b14d8e1d.tar.xz |
src/gobang.go: Put sourceInfo skip level into private const
Diffstat (limited to 'src/gobang.go')
-rw-r--r-- | src/gobang.go | 11 |
1 files changed, 6 insertions, 5 deletions
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, )..., ) |