38 lines
633 B
Go
38 lines
633 B
Go
package service
|
|
|
|
import (
|
|
"q5"
|
|
)
|
|
|
|
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() {
|
|
this.logQueue.Init()
|
|
}
|
|
|
|
func (this *log) unInit() {
|
|
}
|
|
|
|
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)
|
|
}
|