Fix LogAuditRecWithLevel doc comment and fix typo (#29980)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4f62e7b3da
Коммит
077d0872e3
@@ -41,7 +41,7 @@ func (c *Context) LogAuditRec(rec *audit.Record) {
|
|||||||
c.LogAuditRecWithLevel(rec, app.LevelAPI)
|
c.LogAuditRecWithLevel(rec, app.LevelAPI)
|
||||||
}
|
}
|
||||||
|
|
||||||
// LogAuditRec logs an audit record using specified Level.
|
// LogAuditRecWithLevel logs an audit record using specified Level.
|
||||||
// If the context is flagged with a permissions error then `level`
|
// If the context is flagged with a permissions error then `level`
|
||||||
// is ignored and the audit record is emitted with `LevelPerms`.
|
// is ignored and the audit record is emitted with `LevelPerms`.
|
||||||
func (c *Context) LogAuditRecWithLevel(rec *audit.Record, level mlog.Level) {
|
func (c *Context) LogAuditRecWithLevel(rec *audit.Record, level mlog.Level) {
|
||||||
@@ -59,7 +59,7 @@ func (c *Context) LogAuditRecWithLevel(rec *audit.Record, level mlog.Level) {
|
|||||||
c.App.Srv().Audit.LogRecord(level, *rec)
|
c.App.Srv().Audit.LogRecord(level, *rec)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MakeAuditRecord creates a audit record pre-populated with data from this context.
|
// MakeAuditRecord creates an audit record pre-populated with data from this context.
|
||||||
func (c *Context) MakeAuditRecord(event string, initialStatus string) *audit.Record {
|
func (c *Context) MakeAuditRecord(event string, initialStatus string) *audit.Record {
|
||||||
rec := &audit.Record{
|
rec := &audit.Record{
|
||||||
EventName: event,
|
EventName: event,
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user