Interface LogOptions

Options for logging an event. Should always be populated, since outcome is always required.

interface LogOptions {
    associatedResources?: ArchonResourceId[];
    associatedUsers?: User[] | UserId[];
    context?: string;
    eventType: EventType;
    outcome: Outcome;
    sensitiveContext?: string;
    session?: Session;
    severity?: Severity;
}

Properties

associatedResources?: ArchonResourceId[]

The resources associated with/affected by the event that you're logging. Should be populated any time resources are in scope.

associatedUsers?: User[] | UserId[]

The users associated with/affected by the event that you're logging. Should be populated any time users are in scope.

context?: string

Additional context to include with the log message.

eventType: EventType

The type of event that you're logging.

outcome: Outcome

The outcome of the event that you're logging.

sensitiveContext?: string

Privileged information to include with the log message. Should include things like stack traces, PII (that isn't covered by other fields), etc.

session?: Session

The session of the user associated with the event that you're logging. Should be populated any time a user session is in scope.

severity?: Severity

The severity of the event that you're logging.

Think: Will this cause system disruption? How severe? Will default to INFO if not provided.