<PackageReference Include="System.Security.Permissions" Version="9.0.5" />

EventLogPermissionAttribute

Allows declarative permission checks for event logging.
public string MachineName { get; set; }

Gets or sets the name of the computer on which events might be read.

Gets or sets the access levels used in the permissions request.

Initializes a new instance of the EventLogPermissionAttribute class.