1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-06-06 05:51:54 +00:00

bugfix, update custom logger

This commit is contained in:
Newnius 2020-07-17 11:30:24 +08:00
parent e695414b1d
commit 08335ab6cc
3 changed files with 2 additions and 6 deletions

View File

@ -9,10 +9,6 @@ import (
)
type Logger struct {
DebugLevel int
InfoLevel int
WarnLevel int
LoggerLevel string `json:"logger.level"`
LoggerModuleDisabled map[string]bool `json:"logger.modules_disabled"`
mu sync.Mutex

View File

@ -364,6 +364,8 @@ func serverAPI(w http.ResponseWriter, r *http.Request) {
}
func main() {
log = Logger{}
log.Init()
loggerDir := os.Getenv("LoggerOutputDir")
if len(loggerDir) != 0 {
if _, err := os.Stat(loggerDir); os.IsNotExist(err) {

View File

@ -67,8 +67,6 @@ type ResourcePool struct {
func (pool *ResourcePool) init(conf Configuration) {
log.Info("RM started ")
InstanceOfConfiguration().LoggerEnableModule("RM")
pool.networks = map[string]bool{}
pool.networksFree = map[string]bool{}