mirror of
https://github.com/gravitl/netmaker.git
synced 2024-09-21 07:46:04 +08:00
GRA-414: add verbose level 4
This commit is contained in:
parent
404bf4e335
commit
53af1900a8
|
@ -37,7 +37,7 @@ func Log(verbosity int, message ...string) {
|
|||
var currentTime = time.Now()
|
||||
var currentMessage = MakeString(" ", message...)
|
||||
|
||||
if int32(verbosity) >= 4 {
|
||||
if getVerbose() >= 4 {
|
||||
pc, file, line, ok := runtime.Caller(1)
|
||||
if !ok {
|
||||
file = "?"
|
||||
|
|
|
@ -22,7 +22,7 @@ func MakeString(delimeter string, message ...string) string {
|
|||
}
|
||||
|
||||
func getVerbose() int32 {
|
||||
if Verbosity >= 1 && Verbosity <= 3 {
|
||||
if Verbosity >= 1 && Verbosity <= 4 {
|
||||
return int32(Verbosity)
|
||||
}
|
||||
Verbosity = int(servercfg.GetVerbosity())
|
||||
|
|
|
@ -369,7 +369,7 @@ func GetVerbosity() int32 {
|
|||
} else if config.Config.Server.Verbosity != 0 {
|
||||
verbosity = int(config.Config.Server.Verbosity)
|
||||
}
|
||||
if verbosity < 0 || verbosity > 3 {
|
||||
if verbosity < 0 || verbosity > 4 {
|
||||
verbosity = 0
|
||||
}
|
||||
return int32(verbosity)
|
||||
|
|
Loading…
Reference in a new issue