Hide

YetaWF.Core Package Documentation

Display
Print

YetaWF.Core.Audit.Auditing.AddAuditAsync Method

Add one record to the audit log. This method is used by applications to add audit records.

Class: YetaWF.Core.Audit.Auditing
Namespace: YetaWF.Core.Audit
Assembly: YetaWF.Core

Syntax

public static Task AddAuditAsync(
    string action,
    string? idString,
    Guid idGuid,
    string description,
    int dummy = 0,
    bool RequiresRestart = false,
    bool ExpensiveMultiInstance = false,
    object? DataBefore = null,
    object? DataAfter = null );

Parameters

action

An application-specific string that describes the reason for this audit record. Typically, the type and name of the method requesting the audit record to be written is used.

idString

An application-specific string that describes the reason for this audit record.

idGuid

An application-specific Guid that describes the reason for this audit record. For example, operations on modules can save the module's Guid.

description

A description of the audit record summarizing the audit record, in user displayable format.

dummy

Not used. Its purpose is to separate positional parameters from named parameters.

RequiresRestart

Defines whether the current action that caused the audit record to be created requires a restart. This can be set when modifying settings that don't take effect until after the site is restarted.

ExpensiveMultiInstance

Defines whether the current action that caused the audit record is considered an "expensive" operation. Typically, actions that affect shared cashing are considered expensive.

DataBefore

The before image of a data object that was changed, which caused the current audit record to be created. May be null if the data object is added.

DataAfter

The after image of a data object that was changed, which caused the current audit record to be created. May be null if the data object is removed.

See Also YetaWF.Core.Audit.Auditing ClassYetaWF.Core Overview