You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
488 B
26 lines
488 B
package util |
|
|
|
import ( |
|
"time" |
|
|
|
"go-common/library/queue/databus/report" |
|
) |
|
|
|
//AddLogs add action logs |
|
func AddLogs(logtype int, uname string, uid int64, oid int64, action string, obj interface{}) (err error) { |
|
report.Manager(&report.ManagerInfo{ |
|
Uname: uname, |
|
UID: uid, |
|
Business: 1, |
|
Type: logtype, |
|
Oid: oid, |
|
Action: action, |
|
Ctime: time.Now(), |
|
// extra |
|
Index: []interface{}{}, |
|
Content: map[string]interface{}{ |
|
"json": obj, |
|
}, |
|
}) |
|
return |
|
}
|
|
|