MCPcopy
hub / github.com/firecracker-microvm/firecracker-containerd / New

Function New

internal/debug/debug.go:116–126  ·  view source on GitHub ↗

New will return a new Helper in the event an error does not occur. This will parse the logLevel provided to figure out what logging is enabled. New will also validate that the log level is a valid value along with any mutually exclusive values.

(logLevels ...string)

Source from the content-addressed store, hash-verified

114// also validate that the log level is a valid value along with any mutually
115// exclusive values.
116func New(logLevels ...string) (*Helper, error) {
117 h := &Helper{
118 logLevels: logLevels,
119 }
120
121 if err := h.setLogLevels(logLevels); err != nil {
122 return nil, err
123 }
124
125 return h, nil
126}
127
128// GetFirecrackerLogLevel will return the current log level for Firecracker.
129func (h *Helper) GetFirecrackerLogLevel() string {

Callers 4

TestBuildVMConfigurationFunction · 0.92
TestDebugConfigFunction · 0.92
LoadConfigFunction · 0.92
TestParseLogLevelFunction · 0.70

Calls 1

setLogLevelsMethod · 0.95

Tested by 3

TestBuildVMConfigurationFunction · 0.74
TestDebugConfigFunction · 0.74
TestParseLogLevelFunction · 0.56