NebulaLogger

The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.

View the Project on GitHub jongpie/NebulaLogger

LogEntryBuilder

Kind: global class

new LogEntryBuilder(loggingLevel, isConsoleLoggingEnabled)

Constructor used to generate each JavaScript-based log entry event This class is the JavaScript-equivalent of the Apex class LogEntryBuilder

Param Type Description
loggingLevel String The LoggingLevel enum to use for the builder’s instance of LogEntryEvent__e
isConsoleLoggingEnabled Boolean Determines if console.log() methods are execute

logEntryBuilder.setMessage(message) LogEntryBuilder

Sets the log entry event’s message field

Kind: instance method of LogEntryBuilder
Returns: LogEntryBuilder - The same instance of LogEntryBuilder, useful for chaining methods

Param Type Description
message String The string to use to set the entry’s message field

logEntryBuilder.setRecordId(recordId) LogEntryBuilder

Sets the log entry event’s record fields

Kind: instance method of LogEntryBuilder
Returns: LogEntryBuilder - The same instance of LogEntryBuilder, useful for chaining methods

Param Type Description
recordId String The ID of the SObject record related to the entry

logEntryBuilder.setRecord(record) LogEntryBuilder

Sets the log entry event’s record fields

Kind: instance method of LogEntryBuilder
Returns: LogEntryBuilder - The same instance of LogEntryBuilder, useful for chaining methods

Param Type Description
record Object The SObject record related to the entry. The JSON of the record is automatically added to the entry

logEntryBuilder.setScenario(scenario) LogEntryBuilder

Sets the log entry event’s scenario field

Kind: instance method of LogEntryBuilder
Returns: LogEntryBuilder - The same instance of LogEntryBuilder, useful for chaining methods

Param Type Description
scenario String The string to use to set the entry’s scenario field

logEntryBuilder.setError(error) LogEntryBuilder

Sets the log entry event’s exception fields

Kind: instance method of LogEntryBuilder
Returns: LogEntryBuilder - The same instance of LogEntryBuilder, useful for chaining methods

Param Type Description
error Error The instance of a JavaScript Error object to use, or an Apex HTTP error to use

logEntryBuilder.addTag(tag) LogEntryBuilder

Appends the tag to the existing list of tags

Kind: instance method of LogEntryBuilder
Returns: LogEntryBuilder - The same instance of LogEntryBuilder, useful for chaining methods

Param Type Description
tag String The string to add as a tag for the current log entry

logEntryBuilder.addTags(tags) LogEntryBuilder

Appends the tag to the existing list of tags

Kind: instance method of LogEntryBuilder
Returns: LogEntryBuilder - The same instance of LogEntryBuilder, useful for chaining methods

Param Type Description
tags Array.<String> The list of strings to add as tags for the current entry

logEntryBuilder.getComponentLogEntry() ComponentLogEntry

Returns the object used to save log entry data

Kind: instance method of LogEntryBuilder
Returns: ComponentLogEntry - An instance of ComponentLogEntry that matches the Apex class ComponentLogger.ComponentLogEntry