mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 08:31:30 +00:00
29 lines
445 B
Go
29 lines
445 B
Go
package log
|
|
|
|
import (
|
|
"github.com/sagernet/sing/common/logger"
|
|
"github.com/sagernet/sing/common/observable"
|
|
)
|
|
|
|
type (
|
|
Logger logger.Logger
|
|
ContextLogger logger.ContextLogger
|
|
)
|
|
|
|
type Factory interface {
|
|
Level() Level
|
|
SetLevel(level Level)
|
|
Logger() ContextLogger
|
|
NewLogger(tag string) ContextLogger
|
|
}
|
|
|
|
type ObservableFactory interface {
|
|
Factory
|
|
observable.Observable[Entry]
|
|
}
|
|
|
|
type Entry struct {
|
|
Level Level
|
|
Message string
|
|
}
|