(tests): webhook runtime (doc): logger options
This commit is contained in:
+5
-2
@@ -6,10 +6,13 @@ import (
|
||||
"git.scuroneko.dev/scuroneko/sneklog/v2"
|
||||
)
|
||||
|
||||
// LogFormat selects the writer format used by framework loggers.
|
||||
type LogFormat string
|
||||
|
||||
const (
|
||||
// LogFormatText writes human-readable text logs.
|
||||
LogFormatText LogFormat = "text"
|
||||
// LogFormatJSON writes structured JSON logs.
|
||||
LogFormatJSON LogFormat = "json"
|
||||
)
|
||||
|
||||
@@ -22,8 +25,8 @@ func GetLoggerLevel() sneklog.LogLevel {
|
||||
return level
|
||||
}
|
||||
|
||||
// CreateLogger creates a logger with the shared default policy:
|
||||
// JSON stdout output, provided prefix, and provided level.
|
||||
// CreateLogger creates a logger with stdout output, the provided name, level,
|
||||
// format, and optional formatter.
|
||||
func CreateLogger(
|
||||
name string, level sneklog.LogLevel,
|
||||
format LogFormat, formatter *sneklog.Formatter,
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ package utils
|
||||
|
||||
const (
|
||||
// VersionString is the module version string.
|
||||
VersionString = "1.0.0-rc.16"
|
||||
VersionString = "1.0.0"
|
||||
// VersionMajor is the module major version.
|
||||
VersionMajor = 1
|
||||
// VersionMinor is the module minor version.
|
||||
@@ -10,5 +10,5 @@ const (
|
||||
// VersionPatch is the module patch version.
|
||||
VersionPatch = 0
|
||||
// VersionBeta is the prerelease counter for the current version.
|
||||
VersionBeta = 16
|
||||
VersionBeta = 0
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user