summaryrefslogtreecommitdiff
path: root/vendor/codeberg.org/gruf/go-logger/default.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/codeberg.org/gruf/go-logger/default.go')
-rw-r--r--vendor/codeberg.org/gruf/go-logger/default.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/codeberg.org/gruf/go-logger/default.go b/vendor/codeberg.org/gruf/go-logger/default.go
index 0da1f6a66..3fd65c6b1 100644
--- a/vendor/codeberg.org/gruf/go-logger/default.go
+++ b/vendor/codeberg.org/gruf/go-logger/default.go
@@ -76,6 +76,16 @@ func Logf(lvl LEVEL, s string, a ...interface{}) {
Default().Logf(lvl, s, a...)
}
+// LogFields prints the provided fields formatted as key-value pairs at the supplied log level to the global Logger instance.
+func LogFields(lvl LEVEL, fields map[string]interface{}) {
+ Default().LogFields(lvl, fields)
+}
+
+// LogValues prints the provided values formatted as-so at the supplied log level to the global Logger instance.
+func LogValues(lvl LEVEL, a ...interface{}) {
+ Default().LogValues(lvl, a...)
+}
+
// Print simply prints provided arguments to the global Logger instance.
func Print(a ...interface{}) {
Default().Print(a...)
@@ -85,3 +95,13 @@ func Print(a ...interface{}) {
func Printf(s string, a ...interface{}) {
Default().Printf(s, a...)
}
+
+// PrintFields prints the provided fields formatted as key-value pairs to the global Logger instance.
+func PrintFields(fields map[string]interface{}) {
+ Default().PrintFields(fields)
+}
+
+// PrintValues prints the provided values formatted as-so to the global Logger instance.
+func PrintValues(a ...interface{}) {
+ Default().PrintValues(a...)
+}