-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinfo.go
More file actions
33 lines (27 loc) · 812 Bytes
/
info.go
File metadata and controls
33 lines (27 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package eslog
import (
"fmt"
"strings"
)
// Infof logs at [LevelInfo]. Multiple args are joined with " ".
func Info(args ...any) {
Logger.Info(strings.Join(convertAnyToString(args...), " "))
}
// Infof logs at [LevelInfo]. The function uses fmt.Sprintf with given format and args
// and log it.
func Infof(format string, args ...any) {
Logger.Infof(format, args...)
}
// Infof logs at [LevelInfo]. The function uses fmt.Sprintf with given format and args
// and log it.
func (l eSlogLogger) Infof(format string, args ...any) {
l.Info(fmt.Sprintf(format, args...))
}
// InfoLn logs at [LevelInfo] and appends a newline.
func InfoLn(msg string, args ...any) {
Logger.InfoLn(msg, args...)
}
func (l eSlogLogger) InfoLn(msg string, args ...any) {
args = append(args, "\n")
Logger.Info(msg, args...)
}