Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d9a50cd21 | |||
| 8e669449ee | |||
| 81343248b8 |
10
README.md
10
README.md
@@ -1,5 +1,11 @@
|
||||
# levelinglogger
|
||||
# levellogger
|
||||
|
||||
## Intro
|
||||
|
||||
blah blah blah
|
||||
Move along ---- nothing to see here. :joy:
|
||||
|
||||
This was a tiny little idea. However, Structured Logging for go is on the way.
|
||||
|
||||
Until then Zap, Zerolog and Logrus all provide spectacular logging.
|
||||
|
||||
Enjoy
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"runtime/debug"
|
||||
)
|
||||
|
||||
// changed to return a pointer to a new LevelLogger
|
||||
func NewLevelLogger(out io.Writer, level LogLevel) *LevelLogger {
|
||||
|
||||
ll := &LevelLogger{}
|
||||
@@ -189,9 +190,6 @@ func (ll *LevelLogger) SetFlags(logname string, newFlags int) {
|
||||
}
|
||||
|
||||
func (ll *LevelLogger) SetLoggingLevel(l int) {
|
||||
if l < 0 || l > 8 {
|
||||
ll.CurrentLevel = 4 // default
|
||||
} else {
|
||||
switch l {
|
||||
case 0:
|
||||
ll.CurrentLevel = LevelLoggerOff
|
||||
@@ -214,7 +212,6 @@ func (ll *LevelLogger) SetLoggingLevel(l int) {
|
||||
default:
|
||||
ll.CurrentLevel = InfoLevel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (ll *LevelLogger) Blank(n int) {
|
||||
|
||||
Reference in New Issue
Block a user