Compare commits
No commits in common. "main" and "v0.1.0" have entirely different histories.
@ -1,5 +1,3 @@
|
||||
## dates and their corresponding seconds been here :)
|
||||
[24-11-15]
|
||||
u80864958_at_u80864958 = 979
|
||||
[25-03-11]
|
||||
schreifuchs_at_archibald = 195
|
||||
|
23
README.md
23
README.md
@ -1,24 +1,3 @@
|
||||
# logger
|
||||
|
||||
Just a simple logger
|
||||
|
||||
## Logger interfaces
|
||||
Full:
|
||||
```go
|
||||
type Logger interface {
|
||||
Debug(a ...any)
|
||||
Debugf(format string, a ...any)
|
||||
|
||||
Info(a ...any)
|
||||
Infof(format string, a ...any)
|
||||
|
||||
Warn(str ...any)
|
||||
Warnf(format string, a ...any)
|
||||
|
||||
Error(a ...any)
|
||||
Errorf(format string, a ...any)
|
||||
|
||||
Fatal(code int, a ...any)
|
||||
Fatalf(code int, format string, a ...any)
|
||||
}
|
||||
```
|
||||
Just a simple logger
|
13
log.go
13
log.go
@ -2,7 +2,6 @@ package logger
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"git.schreifuchs.ch/schreifuchs/logger/lvl"
|
||||
)
|
||||
@ -60,15 +59,3 @@ func (l *Logger) Error(a ...any) {
|
||||
func (l *Logger) Errorf(format string, a ...any) {
|
||||
l.Logf(lvl.Error, format, a...)
|
||||
}
|
||||
|
||||
// Fatal logs directly do stdout and exis the application with given code.
|
||||
func (l *Logger) Fatal(code int, a ...any) {
|
||||
fmt.Println("Fatal:", fmt.Sprint(a...))
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
// Fatalf logs formated directly do stdout and exis the application with given code.
|
||||
func (l *Logger) Fatalf(code int, format string, a ...any) {
|
||||
fmt.Println("Fatal:", fmt.Sprintf(format, a...))
|
||||
os.Exit(code)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user