summaryrefslogtreecommitdiff
path: root/src/gobang.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-09-27 15:10:50 -0300
committerEuAndreh <eu@euandre.org>2024-09-27 15:10:50 -0300
commit635bf2100c4efeae179b6a5ea0028424e985cc0a (patch)
tree480dbae2e0d84081bd194b31587972bd06436507 /src/gobang.go
parentsrc/gobang.go: Remove `maxInt` and `MinimumPasswordLength` constants (diff)
downloadgobang-635bf2100c4efeae179b6a5ea0028424e985cc0a.tar.gz
gobang-635bf2100c4efeae179b6a5ea0028424e985cc0a.tar.xz
src/gobang.go: Turn private sourceInfoSkip const into public SourceInfoSkip variable
Diffstat (limited to 'src/gobang.go')
-rw-r--r--src/gobang.go15
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,
)...,
)