예제 #1
0
			logLevel = 3
		}
		log.SetLoggers(logLevel, os.Stdout, os.Stderr)

		// clears epm.log file
		util.ClearJobResults()

		// Welcomer....
		logger.Infoln("Hello! I'm EPM.")

		// Fixes path issues and controls for mint-client / eris-keys assumptions
		util.BundleHttpPathCorrect(do)
		util.PrintPathPackage(do)

		// Populates chainID from the chain (if its not passed)
		IfExit(util.GetChainID(do))

		// Populates the tendermint config object for proper websocket connection
		config.Set("chain_id", do.ChainID)
		config.Set("log_level", "error")
		cfg.ApplyConfig(config)
	},

	Run: RunPackage,

	PersistentPostRun: func(cmd *cobra.Command, args []string) {
		// Ensure that errors get written to screen and generally flush the log
		log.Flush()
	},
}
예제 #2
0
파일: eris-pm.go 프로젝트: eris-ltd/eris-pm
		} else if do.Debug {
			log.SetLevel(log.DebugLevel)
		}

		// clears epm.log file
		util.ClearJobResults()

		// Welcomer....
		log.Info("Hello! I'm EPM.")

		// Fixes path issues and controls for mint-client / eris-keys assumptions
		// util.BundleHttpPathCorrect(do)
		util.PrintPathPackage(do)

		// Populates chainID from the chain (if its not passed)
		common.IfExit(util.GetChainID(do))
	},

	Run: RunPackage,

	PersistentPostRun: func(cmd *cobra.Command, args []string) {
		// Ensure that errors get written to screen and generally flush the log
		// log.Flush()
	},
}

func Execute() {
	InitEPM()
	AddGlobalFlags()
	EPMCmd.Execute()
}