logging #1

Merged
grumbulon merged 3 commits from logging into master 2022-06-26 04:08:00 +00:00
Showing only changes of commit 5050b6406c - Show all commits

View file

@ -36,14 +36,14 @@ func (l *Logger) Println(v ...any) {
}
switch l.Level { //Goes through log levels and does stuff based on them (Fatal os.Exit...etc)
case 0:
l.Printer(0, fmt.Sprintln(v...))
l.Printer(0, fmt.Sprintln(v...)) //Fatal level
os.Exit(1)
case 1:
l.Printer(1, fmt.Sprintln(v...))
l.Printer(1, fmt.Sprintln(v...)) //Error level
case 2:
l.Printer(2, fmt.Sprintln(v...))
l.Printer(2, fmt.Sprintln(v...)) //Info level
case 3:
l.Printer(3, fmt.Sprintln(v...))
l.Printer(3, fmt.Sprintln(v...)) //Debug level
}
}