-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.go
More file actions
37 lines (31 loc) · 799 Bytes
/
common.go
File metadata and controls
37 lines (31 loc) · 799 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
34
35
36
37
/*
* Copyright (c) 2024-2026 Mikhail Knyazhev <markus621@yandex.com>. All rights reserved.
* Use of this source code is governed by a BSD 3-Clause license that can be found in the LICENSE file.
*/
package logx
import "io"
const (
levelFatal uint32 = iota
LevelError
LevelWarn
LevelInfo
LevelDebug
)
var levels = map[uint32]string{
levelFatal: "FATAL",
LevelError: "ERROR",
LevelWarn: "WARN",
LevelInfo: "INFO",
LevelDebug: "DEBUG",
}
// Logger base interface
type Logger interface {
SetOutput(out io.Writer)
SetFormatter(f Formatter)
SetLevel(v uint32)
Fatal(message string, args ...interface{})
Error(message string, args ...interface{})
Warn(message string, args ...interface{})
Info(message string, args ...interface{})
Debug(message string, args ...interface{})
}