日志优化,增加30条上限
This commit is contained in:
parent
8817b293ea
commit
d96eaad462
@ -207,6 +207,10 @@ func (f *FriendMod) AddLog(Uid, Type int, Param string) int {
|
||||
Time: GoUtil.Now(),
|
||||
Param: Param,
|
||||
})
|
||||
|
||||
if len(f.Log) > 30 {
|
||||
f.Log = f.Log[len(f.Log)-30:]
|
||||
}
|
||||
return f.AutoId
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user