Skip to content

Commit

Permalink
revert ...
Browse files Browse the repository at this point in the history
  • Loading branch information
name5566 committed Dec 19, 2016
1 parent 456e169 commit abf9052
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 56 deletions.
16 changes: 16 additions & 0 deletions log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,22 @@ func (logger *Logger) Close() {
logger.baseFile = nil
}

func (logger *Logger) doPrintf(level int, printLevel string, format string, a ...interface{}) {
if level < logger.level {
return
}
if logger.baseLogger == nil {
panic("logger closed")
}

format = printLevel + format
logger.baseLogger.Printf(format, a...)

if level == fatalLevel {
os.Exit(1)
}
}

func (logger *Logger) Debug(format string, a ...interface{}) {
logger.doPrintf(debugLevel, printDebugLevel, format, a...)
}
Expand Down
21 changes: 0 additions & 21 deletions log/printf.go

This file was deleted.

35 changes: 0 additions & 35 deletions log/printf_linenumber.go

This file was deleted.

0 comments on commit abf9052

Please sign in to comment.