diff options
author | 2021-12-12 15:47:51 +0100 | |
---|---|---|
committer | 2021-12-12 15:47:51 +0100 | |
commit | 67ac8db190eb82a7758746fb021fa3014f4241b7 (patch) | |
tree | 4a4124ad8f0ee9ec8858b109dd0bcc2e567fc144 /vendor/codeberg.org/gruf/go-logger/default.go | |
parent | upstep dependencies (#339) (diff) | |
download | gotosocial-67ac8db190eb82a7758746fb021fa3014f4241b7.tar.xz |
Upstep Go dependencies (#340)
* Upstep Go dependencies
* tiny linter fix
* Tidy
Diffstat (limited to 'vendor/codeberg.org/gruf/go-logger/default.go')
-rw-r--r-- | vendor/codeberg.org/gruf/go-logger/default.go | 20 |
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...) +} |