implement structured logging

This commit is contained in:
Markus Muellner
2022-06-30 19:37:10 +02:00
committed by Benj Fassbind
parent 0c749922c9
commit 8e62195eb5
21 changed files with 558 additions and 54 deletions

24
console/progress_test.go Normal file
View File

@@ -0,0 +1,24 @@
package console
import (
"fmt"
"testing"
. "gopkg.in/check.v1"
)
func Test(t *testing.T) {
TestingT(t)
}
type ProgressSuite struct {}
var _ = Suite(&ProgressSuite{})
func (s *ProgressSuite) TestNewProgress(c *C) {
p := NewProgress(false)
c.Check(fmt.Sprintf("%T", p.worker), Equals, fmt.Sprintf("%T", &standardProgressWorker{}))
p = NewProgress(true)
c.Check(fmt.Sprintf("%T", p.worker), Equals, fmt.Sprintf("%T", &loggerProgressWorker{}))
}