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

Constants

createLogger Promise.<LoggerService>

Functions

getUserSettings() ComponentLogger.ComponentLoggerSettings

Returns read-only information about the current user's settings, stored in LoggerSettings__c

setScenario(scenario)

Sets the scenario name for the current transaction - this is stored in LogEntryEvent__e.Scenario__c and Log__c.Scenario__c, and can be used to filter & group logs

error(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.ERROR

warn(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.WARN

info(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.INFO

debug(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.DEBUG

fine(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.FINE

finer(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.FINER

finest(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.FINEST

getBufferSize() Integer

Returns the number of entries that have been generated but not yet saved

flushBuffer()

Discards any entries that have been generated but not yet saved

saveLog(saveMethod)

Saves any entries in Logger's buffer, using the specified save method for only this call All subsequent calls to saveLog() will use the transaction save method

createLogger Promise.<LoggerService>

Kind: global constant
Returns: Promise.<LoggerService> - a LoggerService instance

getUserSettings() ComponentLogger.ComponentLoggerSettings

Returns read-only information about the current user’s settings, stored in LoggerSettings__c

Kind: global function
Returns: ComponentLogger.ComponentLoggerSettings - The current user’s instance of the Apex class ComponentLogger.ComponentLoggerSettings

setScenario(scenario)

Sets the scenario name for the current transaction - this is stored in LogEntryEvent__e.Scenario__c and Log__c.Scenario__c, and can be used to filter & group logs

Kind: global function

Param Type Description
scenario String The name to use for the current transaction’s scenario

error(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.ERROR

Kind: global function
Returns: LogEntryBuilder - The new entry’s instance of LogEntryEventBuilder, useful for chaining methods

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

warn(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.WARN

Kind: global function
Returns: LogEntryBuilder - The new entry’s instance of LogEntryEventBuilder, useful for chaining methods

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

info(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.INFO

Kind: global function
Returns: LogEntryBuilder - The new entry’s instance of LogEntryEventBuilder, useful for chaining methods

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

debug(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.DEBUG

Kind: global function
Returns: LogEntryBuilder - The new entry’s instance of LogEntryEventBuilder, useful for chaining methods

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

fine(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.FINE

Kind: global function
Returns: LogEntryBuilder - The new entry’s instance of LogEntryEventBuilder, useful for chaining methods

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

finer(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.FINER

Kind: global function
Returns: LogEntryBuilder - The new entry’s instance of LogEntryEventBuilder, useful for chaining methods

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

finest(message) LogEntryBuilder

Creates a new log entry with logging level == LoggingLevel.FINEST

Kind: global function
Returns: LogEntryBuilder - The new entry’s instance of LogEntryEventBuilder, useful for chaining methods

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

getBufferSize() Integer

Returns the number of entries that have been generated but not yet saved

Kind: global function
Returns: Integer - The buffer’s current size

flushBuffer()

Discards any entries that have been generated but not yet saved

Kind: global function

saveLog(saveMethod)

Saves any entries in Logger’s buffer, using the specified save method for only this call All subsequent calls to saveLog() will use the transaction save method

Kind: global function

Param Type Description
saveMethod String The enum value of Logger.SaveMethod to use for this specific save action