mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-06-07 14:21:55 +00:00
bugfix, update custom logger
This commit is contained in:
parent
e695414b1d
commit
08335ab6cc
@ -9,10 +9,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Logger struct {
|
type Logger struct {
|
||||||
DebugLevel int
|
|
||||||
InfoLevel int
|
|
||||||
WarnLevel int
|
|
||||||
|
|
||||||
LoggerLevel string `json:"logger.level"`
|
LoggerLevel string `json:"logger.level"`
|
||||||
LoggerModuleDisabled map[string]bool `json:"logger.modules_disabled"`
|
LoggerModuleDisabled map[string]bool `json:"logger.modules_disabled"`
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
|
@ -364,6 +364,8 @@ func serverAPI(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
log = Logger{}
|
||||||
|
log.Init()
|
||||||
loggerDir := os.Getenv("LoggerOutputDir")
|
loggerDir := os.Getenv("LoggerOutputDir")
|
||||||
if len(loggerDir) != 0 {
|
if len(loggerDir) != 0 {
|
||||||
if _, err := os.Stat(loggerDir); os.IsNotExist(err) {
|
if _, err := os.Stat(loggerDir); os.IsNotExist(err) {
|
||||||
|
@ -67,8 +67,6 @@ type ResourcePool struct {
|
|||||||
func (pool *ResourcePool) init(conf Configuration) {
|
func (pool *ResourcePool) init(conf Configuration) {
|
||||||
log.Info("RM started ")
|
log.Info("RM started ")
|
||||||
|
|
||||||
InstanceOfConfiguration().LoggerEnableModule("RM")
|
|
||||||
|
|
||||||
pool.networks = map[string]bool{}
|
pool.networks = map[string]bool{}
|
||||||
pool.networksFree = map[string]bool{}
|
pool.networksFree = map[string]bool{}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user