Skip to content

Releases: jongpie/NebulaLogger

Deprecated & replaced BrowserUrl__c fields with new BrowserAddress__c fields

16 Jul 21:12
1f7dbf8
Compare
Choose a tag to compare

Thanks to @Ben-Nathan-CTM for reporting this bug!

Core Unlocked Package Changes

This release fixes #696 by making a couple of changes to how the browser's address is captured when logging in lightning components

  • Updated the Apex class ComponentLogger to auto-truncate JS browser fields (including LogEntryEvent__c.BrowserUrl__c)
    • The public property ComponentLogger.ComponentLogEntry.browserUrl is now deprecated & will be deleted in a future release. It's only intended to be used internally by Nebula Logger, so this hopefully doesn't impact anyone - but mentioning it here, just in case 😉
  • Replaced the text (255) fields BrowserUrl__c on LogEntryEvent__e and LogEntry__c with new long textarea (2000) fields BrowserAddress__c
    • The existing BrowserUrl__c fields are too short to store some long URLs (such as URLs with a lot of parameters), and the existing fields can't be converted from text(255) to long text area fields, so new fields are needed
    • The existing BrowserUrl__c fields will still be populated for foreseeable future (with a truncated value), but they are now considered deprecated - any references in reports, list views, queries, etc. should be updated to use the new BrowserAddress__c fields
  • Documentation: added missing data classification metadata to several existing browser fields on LogEntryEvent__e and LogEntry__c
    • This doesn't impact any functionality, it's just for documentation purposes

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.14...v4.13.15

Custom Field Mappings Support

12 Jul 18:31
2dbbf9f
Compare
Choose a tag to compare

Thanks to @pankaj0509 and @codejester90 for suggesting this enhancement & providing some great feedback!

Core Unlocked Package Changes

This release resolves #655 by adding support for defining, setting, and mapping custom fields within Nebula Logger's data model. This is helpful in orgs that want to extend Nebula Logger's included data model by creating their own org/project-specific fields.

Adding custom fields to the platform event LogEntryEvent__e

To get started, the first step is to add a field to the platform LogEntryEvent__e`

  • Create your own custom fields on LogEntryEvent__e. Any data type supported by platform events can be used.

    • In this example, a custom text field called SomeCustomField__c has been added:

      image

  • Populate your own custom fields in Apex by calling one of the two new instance methods on LogEntryEventBuilder:

    1. setField(Schema.SObjectField field, Object fieldValue)
    2. setField(Map<Schema.SObjectField, Object> fieldToValue)

For now, this functionality is available in Apex. Long-term, equivalent functionality will hopefully be added for Flow & Lightning Components. Here is an example of using the 2 new methods in Apex:

Logger.info('hello, world')
    // Set a single field
    .setField(LogEntryEvent__e.SomeCustomTextField__c, 'some text value')
    // Set multiple fields
    .setField(new Map<Schema.SObjectField, Object>{
        LogEntryEvent__e.AnotherCustomTextField__c => 'another text value',
        LogEntryEvent__e.SomeCustomDatetimeField__c => System.now()
    });

Adding custom fields to the custom objects Log__c, LogEntry__c, and LoggerScenario__c

If you want to store the data in one of Nebula Logger's custom objects, you can follow the above steps, and also...

  • Create an equivalent custom field on one of Nebula Logger's custom objects - right now, only Log__c, LogEntry__c, and LoggerScenario__c are supported.

  • In this example, a custom text field also called SomeCustomField__c has been added to Log__c object - this will be used to store the value of the field LogEntryEvent__e.SomeCustomField__c:

    image

  • Create a record in the new CMDT LoggerFieldMapping__mdt to map the LogEntryEvent__e custom field to the custom object's custom field, shown below. Nebula Logger will automatically populate the custom object's target field with the value of the source LogEntryEvent__e field.

    • In this example, a custom text field called SomeCustomField__c has been added to both LogEntryEvent__e and Log__c.

      image

New extra-tests Metadata

To help with testing Nebula Logger, a few new metadata items have been added to the extra-tests directory. This directory is not included in any of Nebula Logger's packages - its metadata is used to help both with automated tests in the pipeline, as well as manual functional tests.

  • Added some new custom fields for the objects LogEntryEvent__e, Log__c, LogEntry__c, and LoggerScenario__c to the extra-tests directory to provide sample fields that are only used for testing the custom field mapping functionality
  • Added some new CMDT records for the new object LoggerFieldMapping__mdt. These records map the (new) included custom fields (mentioned above)

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.13...v4.13.14

Improved Fully-Qualified References

11 Jul 17:03
48ea5fe
Compare
Choose a tag to compare

Since the unlocked package does not have a namespace, orgs can encounter installation errors for Nebula Logger if the target org has any custom Apex code (classes, enums, interfaces, etc.) with the same name as standard class in the Schema or System namespace (referred to as name shadowing).

This is the same concept & approach as the changes made in several previous releases (listed below) - but my hope is that this PR finally finishes this effort, and all references are now fully qualified.

This shouldn't cause any functional changes to Nebula Logger - this is to tidy up existing references to avoid name collisions so that more orgs can use the unlocked package.

Core Unlocked Package Changes

Apex Code Changes

  • Switched to using fully-qualified references for these standard classes in the Schema and System namespaces :

    • Schema namespace standard classes
      • ApexClassSchema.ApexClass
      • ApexEmailNotificationSchema.ApexEmailNotification
      • ApexTriggerSchema.ApexTrigger
      • AsyncApexJobSchema.AsyncApexJob
      • BatchApexErrorEventSchema.BatchApexErrorEvent
      • CustomPermissionSchema.CustomPermission
      • DisplayTypeSchema.DisplayType
      • FlowDefinitionViewSchema.FlowDefinitionView
      • FlowExecutionErrorEventSchema.FlowExecutionErrorEvent
      • FlowVersionViewSchema.FlowVersionView
      • PermissionSetSchema.PermissionSet
      • PermissionSetAssignmentSchema.PermissionSetAssignment
      • SoapTypeSchema.SoapType
      • UserRecordAccessSchema.UserRecordAccess
      • UserRoleSchema.UserRole
    • System namespace standard classes
      • BatchableContextSystem.BatchableContext
      • ComparableSystem.Comparable
      • DatabaseSystem.Database
      • EventBusSystem.EventBus
      • FinalizerContextSystem.FinalizerContext
      • InstallHandlerSystem.InstallHandler
      • JSONSystem.JSON
      • MatcherSystem.Matcher
      • PatternSystem.Pattern
      • PicklistEntrySystem.PicklistEntry
      • QueueableSystem.Queueable
      • QueueableContextSystem.QueueableContext
      • QuidditySystem.Quiddity
      • RequestSystem.Request
      • RestContextSystem.RestContext
      • RestRequestSystem.RestRequest
      • RestResponseSystem.RestResponse
      • SchedulableSystem.Schedulable
      • SchedulableContextSystem.SchedulableContext
      • SearchSystem.Search
      • TriggerOperationSystem.TriggerOperation
      • UUIDSystem.UUID
  • Scope creep: fixed some flaky tests in LogBatchPurgeController_Tests

extra-tests Metadata Changes

  • Moved the existing name-shadowing classes in the extra-tests directory to be in separate subdirectories (one for each namespace, Schema and System)
  • Added several new name-shadowing classes for all of the Schema & System references (mentioned above) that are now using fully-qualified references
    • These classes are deployed in Nebula Logger's pipeline to enforce that the codebase uses fully-qualified references

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.12...v4.13.13

Added refresh button + spinner on relatedLogEntries LWC

07 Jul 18:51
88c630b
Compare
Choose a tag to compare

Thanks to @andrii-solokh for implementing this enhancement! (PR #703)

Core Unlocked Package Changes

  • Added new refresh button on the LWC relatedLogEntries. This makes it easy to refresh just the list of LogEntry__c records, without having to refresh the entire page

    • When refreshing the data, a lightning-spinner is now overlayed on the LWC

    image

New extra-tests Metadata

  • Added sample flexipage Nebula_Logger_Account_Record_Page that's used as the org default for the Account object when deploying Nebula Logger's extra-tests folder - this makes it easy to test the LWC relatedLogEntries in a scratch org

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.11...v4.13.12

Added tracking of logging user's federation identifier

29 Apr 16:52
4d56ecb
Compare
Choose a tag to compare

Core Unlocked Package Changes

This release adds new fields & automation to track the logging user's federation identifier - this field is used in SAML SSO (Single Sign-On) settings, and is often a person's unique identifier in multiple systems. By capturing it in Nebula Logger, it makes it easier for Salesforce logs to be tied to logs for the same user in other systems.

  • Added new long textarea (512) fields LoggedByFederationIdentifier__c on LogEntryEvent__e and Log__c to track the value of Schema.User.FederationIdentifier for the logging user

  • Added new field Log__c.HasLoggedByFederationIdentifier__c to make it easier to filter/identify records where the user's federation ID has been populated

  • Added field-level security (FLS) for the new Log__c fields to the permission sets LoggerAdmin, LoggerLogViewer, and LoggerEndUser

  • Added new field Log__c.LoggedByFederationIdentifier__c to the flexipage LogRecordPage - it conditionally shows, based on the value of the other new field, Log__c.HasLoggedByFederationIdentifier__c

    image

Big Object Archive Plugin Changes

  • Renamed the Big Object index LogEntryArchiveIndex.indexe-meta.xml to LogEntryArchiveIndex.index-meta.xml (indexe --> index) to fix an issue with newer versions of the sf cli
    • This doesn't impact any functionality in the plugin, so there is not a new release for the plugin - just a small change to the metadata in the repo

Pipeline Changes

  • Deleted several old scripts in package.json and in the directory ./scripts/build
  • Upgraded package dependencies & regenerated package-lock.json
  • Tweaked config in .prettierrc
  • Updated GitHub Actions in build.yml to use v4 (compatible with Node 20)

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.10...v4.13.11

AuthSession Bugfix for LWC Logging

24 Apr 01:50
18b4b52
Compare
Choose a tag to compare

Thanks to @Suryansh-2301 for reporting this bug!

Core Unlocked Package Changes

  • Fixed #678 by removing the filter ParentId = null when querying AuthSession data in LoggerEngineDataSelector
  • Added a small enhancement to store the ParentId of the AuthSession record in the new fields LogEntryEvent__e.ParentSessionId__c and Log__c.ParentSessionId__c
    • Updated permission sets LoggerAdmin, LoggerLogViewer, and LoggerEndUser to provide read access to the new field Log__c.ParentSessionId__c

    • Updated FlexiPage LogRecordPage to conditionally display the new field Log__c.ParentSessionId__c when it's populated

      image

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.9...v4.13.10

Updated Logging Level Emojis

18 Apr 02:59
fcb3b43
Compare
Choose a tag to compare

Thanks to @twentyTwo for suggesting & implementing these changes, and thanks to @PawelWozniak for the feedback!

Core Unlocked Package Changes

  • Closed #665 in PR #672 by updating the formula field LogEntry__c.LoggingLevelWithImage__c to use different emojis for every logging level to make it easier to visually distinguish between them. Previously, the same emoji was used for DEBUG, FINE, FINER, and FINEST. The new list of emojis used are:
    • ERROR => ⛔
    • WARN => ⚠️
    • DEBUG => 🐞
    • INFO => ℹ️
    • FINE => 👍
    • FINER => 👌
    • FINEST => 🌟

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.8...v4.13.9

Fixed logEntryMetadataViewer LWC's 'View Full Source' button not showing for non-admins

18 Apr 01:33
de8088d
Compare
Choose a tag to compare

Core Unlocked Package Changes

  • Worked with @jamessimone to troubleshoot & fix some additional issues in the logEntryMetadataViewer LWC that prevented the 'View Full Source' button from showing up for non-admins. This involved 3 related changes

    1. Added ApexClass access in the permission sets LoggerAdmin, LoggerLogViewer, LoggerEndUser for the Apex class LogEntryMetdataViewerController to fix some permission errors that could occur in some orgs/situations.
    2. Fixed some excessively large whitespace in the LWC caused by a present-but-not-visible spinner.
    3. Updated the logEntryMetadataViewer LWC to imperatively call Apex controller methods - using the @wire annotation caused weird, silent failures when calling the Apex methods, but calling it imperatively seems to work wonderfully (and is more consistent with how the other LWCs in Nebula Logger are written).

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.7...v4.13.8

Fixed setScenario() function in logger LWC

17 Apr 00:49
f4addfd
Compare
Choose a tag to compare

Thanks to @rcastanosgonzalez for reporting and fixing this bug!

Core Unlocked Package Changes

  • Fixed #666 issue in PR #667 by updating the logger LWC's function setScenario() to properly (and always) set the scenario on each log entry. Previously, the value was often incorrectly set to null

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.6...v4.13.7

View Log Entry Metadata custom permission

02 Apr 15:23
8233697
Compare
Choose a tag to compare

Core Unlocked Package Changes

  • Added new custom permission CanViewLogEntryMetadata so that users without query access to ApexClass and ApexTrigger can still see the source code in the LWC logEntryMetadataViewer
  • Updated the permission set LoggerAdmin to assign the new custom permission CanViewLogEntryMetadata
  • Added some more test methods in LogEntryMetadataViewerController_Tests, and cleaned up some code in LogEntryMetadataViewerController

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.5...v4.13.6