initLogging initializes loggers.
(traceHandle io.Writer, infoHandle io.Writer, guiVersion bool)
| 246 | |
| 247 | // initLogging initializes loggers. |
| 248 | func 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 |
| 260 | func initLoggingWithCmdParameters(logLevelPtr *string, cmd bool) { |
no outgoing calls