NebulaLogger

The most robust observability solution for Salesforce experts. Built 100% natively on the platform, and designed to work seamlessly with Apex, Lightning Components, Flow, OmniStudio, and integrations.

View the Project on GitHub jongpie/NebulaLogger

LoggerSObjectProxy class

Proxy class used as a middle layer between some problematic SObject Types and the rest of Nebula Logger's codebase. Each inner class maps to a corresponding SObjectType that is difficult to work with Apex for some reason or another, such as not being mockable or creatable, or not existing in all orgs.


Methods

serialize()String


Inner Classes

LoggerSObjectProxy.AuthSession class

All Schema.AuthSession SObjects are read-only in Apex, which makes them more difficult to work with, and impossible to mock field values directly during unit tests - even using tricks like System.JSON.deserialize() do not work. The LoggerSObjectProxy.AuthSession class acts as a substitute for a Schema.AuthSession record to provide the abilility to mock the data during unit & integration tests.


Properties
Idpublic
LoginHistorypublic
LoginHistoryIdId
LoginTypeString
LogoutUrlString
ParentIdId
SessionSecurityLevelString
SessionTypeString
SourceIpString
UsersIdId

LoggerSObjectProxy.LoginHistory class

All Schema.LoginHistory SObjects are read-only in Apex, which makes them more difficult to work with, and impossible to mock field values directly during unit tests - even using tricks like System.JSON.deserialize() do not work. The LoggerSObjectProxy.LoginHistory class acts as a substitute for a Schema.LoginHistory record to provide the abilility to mock the data during unit & integration tests.


Properties
ApplicationString
BrowserString
PlatformString
UserIdId

LoggerSObjectProxy.Network class

Not all orgs have the SObject Schema.Network - it is only present in orgs that have enabled Experience Cloud Sites (communities/networks), so Schema.Network has to be referenced dynamically, including using hardcoded String values for field API names. The LoggerSObjectProxy.Network class acts as a substitute for a Schema.Network record so that the rest of the codebase can rely on strongly-typed references to fields (properties).


Properties
IdString
NameString
UrlPathPrefixString

LoggerSObjectProxy.OmniProcess class

Not all orgs have the SObject Schema.OmniProcess - it is only present in orgs that have enabled OmniStudio, so Schema.OmniProcess has to be referenced dynamically, including using hardcoded String values for field API names. The LoggerSObjectProxy.OmniProcess class acts as a substitute for a Schema.OmniProcess record so that the rest of the codebase can rely on strongly-typed references to fields (properties).


Properties
CreatedBySchema.User
CreatedByIdId
CreatedDateDatetime
IdString
LastModifiedBySchema.User
LastModifiedByIdId
LastModifiedDateDatetime
OmniProcessTypeString
UniqueNameString