Last active
December 22, 2015 11:58
-
-
Save stephanos/6468975 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package log | |
type Log interface { | |
Debug(format string, params ...interface{}) | |
Info(format string, params ...interface{}) | |
Warn(format string, params ...interface{}) error | |
Error(format string, params ...interface{}) error | |
Critical(format string, params ...interface{}) error | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package log | |
import ( | |
log "github.com/cihub/seelog" | |
) | |
type logger struct {} | |
func New() Log { | |
return &logger{} | |
} | |
func (self *logger) Debug(format string, args ...interface{}) { | |
log.Debugf(format, args...) | |
} | |
func (self *logger) Info(format string, args ...interface{}) { | |
log.Infof(format, args...) | |
} | |
func (self *logger) Warn(format string, args ...interface{}) error { | |
return log.Warnf(format, args...) | |
} | |
func (self *logger) Error(format string, args ...interface{}) error { | |
return log.Errorf(format, args...) | |
} | |
func (self *logger) Critical(format string, args ...interface{}) error { | |
return log.Criticalf(format, args...) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment