From 924d5ca12a911113699d2288c197ec39daacbc69 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 26 Oct 2020 19:45:22 +0800 Subject: [PATCH] 1 --- app.go | 7 +++++++ sysutils.go | 12 +++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app.go b/app.go index 5b7dc12..4b288d0 100644 --- a/app.go +++ b/app.go @@ -57,6 +57,7 @@ func (this *App_) Init() { this.loopCond = sync.NewCond(new(sync.Mutex)) this.chGoLoopTimerExit = make(chan int) this.chGoLoopWait = make(chan int64) + this.outputRuningLog() go this.goLoopTimer() } @@ -148,3 +149,9 @@ func (this *App_) schedule() { func (this *App_) NowUnix() int64 { return this.nowTime.Unix() } + +func (this *App_) outputRuningLog() { + for _, val := range q5.GetInitLogs() { + SysLog().Info("%s", val) + } +} diff --git a/sysutils.go b/sysutils.go index b060891..9e7d44b 100644 --- a/sysutils.go +++ b/sysutils.go @@ -1,13 +1,15 @@ package f5 -import "os" -import "strings" -import "q5" +import ( + "os" + "strings" + "q5" +) const ( ONLINE_ENV = 0 - TEST_ENV - DEV_ENV + TEST_ENV = iota + DEV_ENV = iota ) var serverEnv int32