-
-
Notifications
You must be signed in to change notification settings - Fork 165
Configuring User Settings
Jonathan Gillespie edited this page Sep 15, 2024
·
1 revision
The hierarchy custom settings object LoggerSettings__c
is used to control the behavior of several aspects of the logging system. It can be configured at the org, profile, and/or user levels, referred to as the "Setup Owner".
Setting Field Name | Default Value | Description |
IsEnabled__c | true | Determines if Logger runs for the specified Setup Owner |
LoggingLevel__c | DEBUG |
The name of the Logging Level enum value to use for the specified Setup Owner. Only log entries that meet the specified logging level will be logged for the Setup Owner - for example, when 'INFO' is used for a particular user, only log entries with logging level 'ERROR', 'WARN' or 'INFO' will be logged. Possible values:
|
DefaultSaveMethod__c | EVENT_BUS | This controls the default save method used by Logger when calling saveLog(). Possible values come from the enum Logger.SaveMethod :
|
ApplyDataMaskRules__c | true | When enabled, any [configured data mask rules](./Configuring-Data-Mask-Rules) will run for the specified Setup Owner |
StripInaccessibleRecordFields__c | false | Disabled by default, when enabled, any time an `SObject` record is logged (or a `List` is logged), only fields that the specified Setup Owner can access will be included in the record's JSON. This is useful in orgs where end-users have access to view `Log__c` and `LogEntry__c` records. |
AnonymousMode__c | false |
When enabled, logs for the specified Setup Owner are stored anonymously - data stored in the custom objects Log__c and LogEntry__c will not contain any user-identifying info. The audit fields CreatedById and LastModifiedById will (continue to) be the 'Automated Process' system-user. Notes:
|
SystemLogMessageFormat__c | {OriginType__c}\n{Message__c} |
Logger automatically calls System.debug() - the output can be configured using Handlebars-esque syntax to refer to fields on the `LogEntryEvent__e` Platform Event. You can use curly braces to denote merge field logic, eg: `{OriginLocation__c}\n{Message__c}` - this will output the contents of `LogEntryEvent__e.OriginLocation__c`, a line break, and then the contents of `LogEntryEvent__e.Message__c`
|
DefaultLogShareAccessLevel__c | Read |
Uses Apex managed sharing to grants users read or edit access to their log records (on insert only). When no access level is specified, no Apex sharing logic is executed. This only gives record-level access - users will still need to be granted access to the Log__c object using permission sets or profiles. Possible Values:
|
DefaultNumberOfDaysToRetainLogs__c | 14 | This value is used to set the field Log__c.LogRetentionDate__c, which is then used by the LogBatchPurger batch job to delete old logs. To keep logs indefinitely for the specified Setup Owner, set this field to blank (null). |
EnableSystemMessages__c | 14 | When enabled, log entries may be generated that contain additional details about the logging system. For example, when the batch job LogBatchPurger runs and EnableSystemMessages__c == true, it will create additional log entries with information about how many records are being deleted. |
- Assigning Permission Sets to Users
- Configuring Global Feature Flags
- Configuring Profile & User-Specific Settings
- Configuring Data Mask Rules
Manual Instrumentation
- Logging in Apex
- Logging in Flow & Process Builder
- Logging in Lightning Web Components & Aura Components
- Logging in OmniStudio
- Logging in OpenTelemetry (OTEL) REST API
ISVs & Package Dependencies
- Overview
- Optionally Use Nebula Logger (When Available) with
Callable
Interface - Require Nebula Logger with Strongly-Coupled Package Dependency
Troubleshooting
Pub/Sub with Platform Events
Persisted Data with Custom Objects
- Logger Console app
- Assigning & Managing Logs
- Using 'View Related Log Entries' Component on Record Pages
- Deleting Old Logs
Official Plugins