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

Method loadLog

internal/cli/cli.go:319–329  ·  view source on GitHub ↗

loadLog loads the logger

()

Source from the content-addressed store, hash-verified

317
318// loadLog loads the logger
319func (c *CLI) loadLog() (log.Log, error) {
320 if c.log != nil {
321 return c.log, nil
322 }
323 level, err := log.ParseLevel(c.Log)
324 if err != nil {
325 return nil, err
326 }
327 c.log = log.New(levelfilter.New(console.New(c.Stderr), level))
328 return c.log, nil
329}
330
331func (c *CLI) openDB(log log.Log, module *gomod.Module) (*dag.DB, error) {
332 if c.db != nil {

Callers 5

ToolDSMethod · 0.95
GenerateMethod · 0.95
RunMethod · 0.95
CreateMethod · 0.95
ToolDiMethod · 0.95

Calls 4

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

Tested by

no test coverage detected