MCPcopy
hub / github.com/hardentools/hardentools / initLogging

Function initLogging

utils.go:248–257  ·  view source on GitHub ↗

initLogging initializes loggers.

(traceHandle io.Writer, infoHandle io.Writer, guiVersion bool)

Source from the content-addressed store, hash-verified

246
247// initLogging initializes loggers.
248func initLogging(traceHandle io.Writer, infoHandle io.Writer, guiVersion bool) {
249 if guiVersion {
250 Trace = log.New(traceHandle, "TRACE: ", log.Lshortfile)
251 Info = log.New(infoHandle, "INFO: ", log.Lshortfile)
252 } else {
253 Trace = log.New(traceHandle, "", 0)
254 Info = log.New(infoHandle, "", 0)
255 }
256 log.SetOutput(infoHandle)
257}
258
259// initLoggingWithCmdParameters initializes logging considering if cli version specifics
260func initLoggingWithCmdParameters(logLevelPtr *string, cmd bool) {

Callers 2

TestIsHardenedFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsHardenedFunction · 0.68