Skip to content

Instantly share code, notes, and snippets.

@stephanos
Last active December 22, 2015 11:58
Show Gist options
  • Save stephanos/6468975 to your computer and use it in GitHub Desktop.
Save stephanos/6468975 to your computer and use it in GitHub Desktop.
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
}
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