generated from TrueCloudLab/basic
61 lines
1 KiB
Text
61 lines
1 KiB
Text
package src_test
|
|
|
|
import (
|
|
"fmt"
|
|
tochno_ne_const_dly_log "git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"// The alias of the package with constants differs from the one used
|
|
)
|
|
|
|
/*After upgrading to golangci-lint version 1.5.4 and adding linter configuration, it will be possible to get rid of 'magic repositories'*/
|
|
|
|
func (c *cfg) info_n() {
|
|
c.log.Info(logs.MSG)
|
|
}
|
|
|
|
func (c *cfg) debug_n() {
|
|
c.log.Debug(logs.MSG)
|
|
}
|
|
|
|
func (c *cfg) error_n() {
|
|
c.log.Error(logs.MSG)
|
|
}
|
|
|
|
func (c *cfg) reportFlushError_n() {
|
|
c.log.reportFlushError(logs.MSG)
|
|
}
|
|
|
|
func (c *cfg) reportError_n() {
|
|
c.log.reportError(logs.MSG)
|
|
}
|
|
|
|
|
|
|
|
type Logger interface {
|
|
Debug(msg string)
|
|
Info(msg string)
|
|
Warn(msg string)
|
|
Error(msg string)
|
|
Abyr(msg string)
|
|
}
|
|
|
|
type RealLogger struct{}
|
|
|
|
func (l RealLogger) Debug(msg string) {
|
|
}
|
|
func (l RealLogger) Info(msg string) {
|
|
}
|
|
func (l RealLogger) Warn(msg string) {
|
|
}
|
|
func (l RealLogger) Error(msg string) {
|
|
}
|
|
func (l RealLogger) Abyr(msg string) {
|
|
}
|
|
|
|
var logs = struct {
|
|
MSG string
|
|
}{
|
|
MSG: "some message",
|
|
}
|
|
|
|
type cfg struct {
|
|
log Logger
|
|
}
|