logging #1
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue