Add features from README

This commit is contained in:
Simon Eskildsen
2014-03-10 19:22:08 -04:00
parent e155f76d1b
commit 53371e3664
11 changed files with 285 additions and 178 deletions
+4 -9
View File
@@ -1,24 +1,19 @@
package logrus
import ()
// TODO: Type naming here feels awkward, but the exposed variable should be
// Level. That's more important than the type name, and libraries should be
// reaching for logrus.Level{Debug,Info,Warning,Fatal}, not defining the type
// themselves as an int.
type LevelType uint8
type Fields map[string]interface{}
type LevelType uint8
const (
LevelPanic LevelType = iota
LevelFatal
LevelWarning
LevelError
LevelWarn
LevelInfo
LevelDebug
)
var Level LevelType = LevelInfo
var Environment string = "development"
// StandardLogger is what your logrus-enabled library should take, that way
// it'll accept a stdlib logger and a logrus logger. There's no standard