mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-11 13:04:41 +08:00
Merge branch 'master' of https://github.com/duanhf2012/Origin
This commit is contained in:
@@ -98,6 +98,14 @@ func (slf *BaseModule) GetModuleById(moduleId uint32) IModule {
|
||||
return ret
|
||||
}
|
||||
|
||||
func (slf *BaseModule) GetModuleCount() int {
|
||||
locker := slf.GetRoot().getBaseModule().getLocker()
|
||||
locker.Lock()
|
||||
defer locker.Unlock()
|
||||
|
||||
return len(slf.mapModule)
|
||||
}
|
||||
|
||||
func (slf *BaseModule) genModuleId() uint32 {
|
||||
slf.CurrMaxModuleId++
|
||||
moduleId := slf.CurrMaxModuleId
|
||||
|
||||
@@ -106,7 +106,7 @@ func (slf *LogModule) Printf(level uint, format string, v ...interface{}) {
|
||||
if slf.openLevel == LEVER_DEBUG || slf.listenFun != nil {
|
||||
strlog := fmt.Sprintf(format, v...)
|
||||
if slf.openLevel == LEVER_DEBUG {
|
||||
fmt.Println(LogPrefix[level], strlog)
|
||||
fmt.Println(LogPrefix[level], time.Now().Format("2006/1/2 15:04:05"), strlog)
|
||||
}
|
||||
|
||||
if slf.listenFun != nil {
|
||||
|
||||
Reference in New Issue
Block a user