Пример #1
0
func (self *GLWeb) loadgls() {
	gls, err := WalkDir(self.glspath, ".gl")
	log.Debugln("gls:", gls)
	if err != nil {
		log.Errorln("GLWeb loadgls  WalkDir Error.", err)
		return
	}

	for _, g := range gls {
		self.loadgl(g)
	}
}
Пример #2
0
Файл: api.go Проект: nzlov/go
func apiDebugln(L *lua.LState) int {
	n := L.GetTop()
	as := make([]interface{}, n)

	for i := 1; i <= n; i++ {
		any := L.CheckAny(i)
		as[i-1] = any
	}

	log.Debugln(as...)

	return 0
}
Пример #3
0
func (self *GLWeb) fnotify() {

	rootfile, err := filemonitor.NewFileEntry(self.glspath)
	log.Debugln("rootfile", rootfile.Path())
	if err != nil {
		log.Errorln("file Error:", err)
		return
	}
	fileFilter := filemonitor.NewFileFilter()
	fileFilter.AddFilter(".gl")
	self.fobserver = filemonitor.NewFileMonitorObserverByFileEntryAndFileFileter(
		rootfile,
		fileFilter,
	)
	self.fobserver.AddListener(self)
	self.fmonitor = filemonitor.NewFileMonitorByDt(self.fobserver, time.Second)
	self.fmonitor.Start()
	log.Infoln("GLWeb FileMonitor Start...")
}
Пример #4
0
Файл: t1.go Проект: nzlov/glog
func a() {
	go func() {
		i := 1
		for {
			glog.Errorln(i)
			glog.Debugln(i)
			glog.NewField().
				Set("k", "v").
				Set("k1", "v1").
				Warnln(i)
			glog.NewTagField("tag").
				Set("k", "v").Infoln(i)
			i++
			time.Sleep(time.Second)
		}
	}()
	time.Sleep(time.Second * 2)
	go glog.Go(a1, 1, 0)
	time.Sleep(time.Second * 5)
}