add Title to debugPrint
This commit is contained in:
parent
84ac66270c
commit
f8687082c3
1 changed files with 6 additions and 2 deletions
|
@ -2,11 +2,15 @@ package utils
|
|||
|
||||
import "log"
|
||||
|
||||
var DebugMode bool = false
|
||||
var (
|
||||
DebugMode bool = false
|
||||
DebugTitle string = "DEBUG"
|
||||
)
|
||||
|
||||
// DebugPrint prints the given message to the log if the debug flag is set.
|
||||
func DebugPrint(message ...any) {
|
||||
if DebugMode {
|
||||
log.Println(message...)
|
||||
// add DebugTitle to the message
|
||||
log.Println(DebugTitle, message)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue