Skip to content

LogMessage

codefriar edited this page Oct 5, 2023 · 2 revisions

STATUS: ACTIVE

A class for automatically attaching metadata to log messages like Quiddity and RequestID

See Log

See LogException

See LogTriggerHandler

Constructors

public LogMessage(LoggingLevel severity, String message)

Constructor accepting a message to log. Severity is auto set to info

Parameters

Param Description
severity LoggingLevel the severity of the message
message String the string to log

public LogMessage(String message)

Constructor accepting a message to log. Severity is auto set to info

Parameters

Param Description
message String the string to log

public LogMessage(Exception ex)

Constructor accepting an exception object.

Parameters

Param Description
ex any exception object

Fields

private EXCEPTION_STRING_FORMATString


Properties

public messageString

Public message property.

public quiddityQuiddity

Public read only property for quiddity. Privately set.

public requestIdString

public read only property for the request ID. Privately set.

public severityLoggingLevel

Public severity property.


Methods

public Log__e toEvent()

converts this object to an event for publishing

Returns

Type Description
Log__e SObject

Clone this wiki locally