MCPcopy
hub / github.com/livebud/bud / New

Function New

package/log/testlog/testlog.go:24–30  ·  view source on GitHub ↗

New logger for testing. You can set the log level for a given test by using the --log= flag. For example, `go test ./... --log=debug` will run tests with debug logs on.

()

Source from the content-addressed store, hash-verified

22// using the --log=<pattern> flag. For example, `go test ./... --log=debug` will
23// run tests with debug logs on.
24func New() log.Log {
25 level, err := log.ParseLevel(*logFlag)
26 if err != nil {
27 panic(fmt.Sprintf("testlog: invalid --log=[level] %q" + *logFlag))
28 }
29 return log.New(levelfilter.New(console.New(os.Stderr), level))
30}

Callers 15

TestServeFileFunction · 0.92
TestNodeModulesFunction · 0.92
TestGenerateDirFunction · 0.92
TestUpdateFileFunction · 0.92
TestSvelteHelloFunction · 0.92
TestSvelteAwaitFunction · 0.92
TestSveltePropsFunction · 0.92
TestSvelteLocalImportsFunction · 0.92
TestUpdateFileFunction · 0.92
loadServerFunction · 0.92
TestOpenFunction · 0.92
TestOpen404Function · 0.92

Calls 4

ParseLevelFunction · 0.92
NewFunction · 0.92
NewFunction · 0.92
NewFunction · 0.92

Tested by 15

TestServeFileFunction · 0.74
TestNodeModulesFunction · 0.74
TestGenerateDirFunction · 0.74
TestUpdateFileFunction · 0.74
TestSvelteHelloFunction · 0.74
TestSvelteAwaitFunction · 0.74
TestSveltePropsFunction · 0.74
TestSvelteLocalImportsFunction · 0.74
TestUpdateFileFunction · 0.74
loadServerFunction · 0.74
TestOpenFunction · 0.74
TestOpen404Function · 0.74