1
This commit is contained in:
parent
8cbd342c75
commit
2d37a501d8
@ -1,17 +1,37 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"q5"
|
||||||
)
|
)
|
||||||
|
|
||||||
type log struct {
|
type logNode struct {
|
||||||
|
accountId string
|
||||||
|
logType string
|
||||||
|
subLogType string
|
||||||
|
currTime int64
|
||||||
|
params map[string]string
|
||||||
|
entry q5.ListHead
|
||||||
|
}
|
||||||
|
|
||||||
|
type log struct {
|
||||||
|
logQueue q5.Queue
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *log) init() {
|
func (this *log) init() {
|
||||||
|
this.logQueue.Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *log) unInit() {
|
func (this *log) unInit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *log) AddLog(accountId string, logType string, subType string, params map[string]string) {
|
func (this *log) AddAsyncLog(accountId string, logType string, subLogType string, currTime int64,
|
||||||
|
params map[string]string) {
|
||||||
|
node := new(logNode)
|
||||||
|
node.accountId = accountId
|
||||||
|
node.logType = logType
|
||||||
|
node.subLogType = subLogType
|
||||||
|
node.currTime = currTime
|
||||||
|
node.params = params
|
||||||
|
node.entry.Init(node)
|
||||||
|
this.logQueue.Push(&node.entry)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user