backuper/logger.go
nxshock 19e809966a Rework
* update logger routines
* add index file support
* split file masks and path masks
2023-04-03 19:43:16 +05:00

33 lines
395 B
Go

package main
import "log"
type LogLevel int
const (
Debug LogLevel = iota
Info
Warn
Error
)
func (b *Config) log(l LogLevel, a ...interface{}) {
if l < b.LogLevel {
return
}
log.Print(a...)
}
func (b *Config) logf(l LogLevel, s string, a ...interface{}) {
if l < b.LogLevel {
return
}
log.Printf(s, a...)
}
func (b *Config) fatalln(a ...interface{}) {
log.Fatalln(a...)
}