Merge github.com/sirupsen/logrus into github.com/roganartu/logrus

This commit is contained in:
Tony Lee
2017-01-24 22:52:54 +11:00
6 changed files with 153 additions and 21 deletions
+9
View File
@@ -96,5 +96,14 @@ func TestDisableLevelTruncation(t *testing.T) {
checkDisableTruncation(false, InfoLevel)
}
func TestDisableTimestampWithColoredOutput(t *testing.T) {
tf := &TextFormatter{DisableTimestamp: true, ForceColors: true}
b, _ := tf.Format(WithField("test", "test"))
if strings.Contains(string(b), "[0000]") {
t.Error("timestamp not expected when DisableTimestamp is true")
}
}
// TODO add tests for sorting etc., this requires a parser for the text
// formatter output.