Refactor logger (#1185)

* refactor: logger

* refactor: logging

* refactor: rename func

* refactor: logging

* refactor: logging format
This commit is contained in:
Kota Kanbe
2021-02-26 10:36:58 +09:00
committed by GitHub
parent 518f4dc039
commit 3f2ac45d71
58 changed files with 455 additions and 408 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/future-architect/vuls/config"
"github.com/future-architect/vuls/constant"
"github.com/future-architect/vuls/logging"
"github.com/future-architect/vuls/models"
"github.com/future-architect/vuls/util"
"golang.org/x/xerrors"
@@ -26,7 +27,7 @@ func newBsd(c config.ServerInfo) *bsd {
},
},
}
d.log = util.NewCustomLogger(c)
d.log = logging.NewNormalLogger()
d.setServerInfo(c)
return d
}
@@ -46,7 +47,7 @@ func detectFreebsd(c config.ServerInfo) (bool, osTypeInterface) {
}
}
}
util.Log.Debugf("Not FreeBSD. servernam: %s", c.ServerName)
logging.Log.Debugf("Not FreeBSD. servernam: %s", c.ServerName)
return false, nil
}