MCPcopy Create free account
hub / github.com/DNAProject/DNA / initLog

Function initLog

main.go:202–213  ·  view source on GitHub ↗
(ctx *cli.Context)

Source from the content-addressed store, hash-verified

200}
201
202func initLog(ctx *cli.Context) {
203 //init log module
204 logLevel := ctx.GlobalInt(utils.GetFlagName(utils.LogLevelFlag))
205 //if true, the log will not be output to the file
206 disableLogFile := ctx.GlobalBool(utils.GetFlagName(utils.DisableLogFileFlag))
207 if disableLogFile {
208 log.InitLog(logLevel, log.Stdout)
209 } else {
210 alog.InitLog(log.PATH)
211 log.InitLog(logLevel, log.PATH, log.Stdout)
212 }
213}
214
215func initConfig(ctx *cli.Context) (*config.BlockchainConfig, error) {
216 //init ontology config from cli

Callers 1

startDNAFunction · 0.85

Calls 1

GetFlagNameFunction · 0.92

Tested by

no test coverage detected