Esempio n. 1
0
// global before handler
func (ctx *bootContext) initialize(c *cli.Context) (err error) {
	// inject parameters into package.tunnel
	VER_STRING = versionString()
	VERSION = version
	DEBUG = ctx.debug
	// inject parameters into package.exception
	ex.DEBUG = ctx.debug
	// glog
	ctx.vSpecified = c.IsSet("v")
	log.SetLogOutput(ctx.logdir)
	log.SetLogVerbose(ctx.vFlag)
	return nil
}
Esempio n. 2
0
func init() {
	runtime.GOMAXPROCS(runtime.NumCPU())
	v := initAddonArgs(0)
	log.SetLogOutput("")
	log.SetLogVerbose(v)
	cltAddr += strconv.FormatInt(randomRange(1, 1<<13)+3e4, 10)
	svrAddr += strconv.FormatInt(randomRange(1, 1<<13)+3e4, 10)
	dstAddr += strconv.FormatInt(randomRange(1, 1<<13)+3e4, 10)
	fmt.Println("=== deblocus TEST ===")
	printArgLine("logV", v)
	printArgLine("cltAddr", cltAddr)
	printArgLine("svrAddr", svrAddr)
	printArgLine("dstAddr", dstAddr)
	fmt.Println("\n")
}