Exemplo n.º 1
0
func newStdLogger() types.Logger {
	l, err := logger.New(config.NewLogger("std", []byte(`{"level":"error"}`)))
	if err != nil {
		panic(err)
	}
	return l
}
Exemplo n.º 2
0
func TestCreatingBogusLogger(t *testing.T) {
	t.Parallel()
	_, err := New(config.NewLogger("bogus_logger", nil))

	if err == nil {
		t.Error("There was no error when creating bogus logger")
	}
}
func aFullCache(b *testing.B, size uint64) *TieredLRUCache {
	cz := getCacheZone()
	cz.StorageObjects = size
	l, _ := logger.New(config.NewLogger("nillogger", nil))
	lru := New(cz, mockRemove, l)
	fillCache(b, lru)
	return lru

}