Commit 5673fb56 authored by ale's avatar ale

Mark audit logs with log_type=account_audit

parent eef4b6e1
Pipeline #5069 passed with stages
in 4 minutes and 11 seconds
......@@ -5,11 +5,16 @@ import (
// A fixed log_type makes it possible to limit searches to this
// specific category of logs.
const auditLogType = "account_audit"
type auditLogger interface {
Log(*RequestContext, *Resource, string)
type auditLogEntry struct {
LogType string `json:"log_type"`
User string `json:"user,omitempty"`
By string `json:"by"`
Message string `json:"message"`
......@@ -22,6 +27,7 @@ type syslogAuditLogger struct{}
func (l *syslogAuditLogger) Log(rctx *RequestContext, rsrc *Resource, what string) {
e := auditLogEntry{
LogType: auditLogType,
Message: what,
Comment: rctx.Comment,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment