mirror of
https://github.com/goharbor/harbor
synced 2024-09-20 15:45:41 +00:00
Add resource type in forward audit log (#17216)
Add resource type when forward audit log fixes #17201 Signed-off-by: stonezdj <stonezdj@gmail.com>
This commit is contained in:
parent
e58f18bd51
commit
8e876d847c
|
@ -72,7 +72,7 @@ func (m *manager) Get(ctx context.Context, id int64) (*model.AuditLog, error) {
|
|||
func (m *manager) Create(ctx context.Context, audit *model.AuditLog) (int64, error) {
|
||||
if len(config.AuditLogForwardEndpoint(ctx)) > 0 {
|
||||
LogMgr.DefaultLogger(ctx).WithField("operator", audit.Username).
|
||||
WithField("time", audit.OpTime).
|
||||
WithField("time", audit.OpTime).WithField("resourceType", audit.ResourceType).
|
||||
Infof("action:%s, resource:%s", audit.Operation, audit.Resource)
|
||||
}
|
||||
if config.SkipAuditLogDatabase(ctx) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user