Skip to content

Commit

Permalink
Code review feedback from @jongpie
Browse files Browse the repository at this point in the history
  • Loading branch information
jamessimone committed Oct 23, 2024
1 parent 2684676 commit 2745784
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

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.

## Unlocked Package - v4.14.14
## Unlocked Package - v4.14.15

[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oWIQAY)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oWIQAY)
Expand Down
10 changes: 6 additions & 4 deletions nebula-logger/core/main/logger-engine/classes/Logger.cls
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
global with sharing class Logger {
// There's no reliable way to get the version number dynamically in Apex
@TestVisible
private static final String CURRENT_VERSION_NUMBER = 'v4.14.14';
private static final String CURRENT_VERSION_NUMBER = 'v4.14.15';
private static final System.LoggingLevel FALLBACK_LOGGING_LEVEL = System.LoggingLevel.DEBUG;
private static final List<LogEntryEventBuilder> LOG_ENTRIES_BUFFER = new List<LogEntryEventBuilder>();
private static final String MISSING_SCENARIO_ERROR_MESSAGE = 'No logger scenario specified. A scenario is required for logging in this org.';
Expand Down Expand Up @@ -3473,7 +3473,9 @@ global with sharing class Logger {
// intended behavior
if (currentAsyncContext == null) {
currentAsyncContext = asyncContext;
info('Nebula Logger - Async Context: ' + System.JSON.serializePretty(asyncContext, true));
if (LoggerParameter.ENABLE_SYSTEM_MESSAGES) {
info('Nebula Logger - Async Context: ' + System.JSON.serializePretty(asyncContext, true)).setExceptionDetails(asyncContext.finalizerException);
}
}
}

Expand Down Expand Up @@ -3590,7 +3592,7 @@ global with sharing class Logger {
public final String childJobId;
public final String triggerId;
public final String finalizerResult;
public final String finalizerException;
public final Exception finalizerException;

public AsyncContext(Database.BatchableContext batchableContext) {
this.childJobId = batchableContext?.getChildJobId();
Expand All @@ -3600,7 +3602,7 @@ global with sharing class Logger {

public AsyncContext(System.FinalizerContext finalizerContext) {
if (finalizerContext != null) {
this.finalizerException = finalizerContext.getException()?.getMessage() + '\n' + finalizerContext.getException()?.getStackTraceString() ?? null;
this.finalizerException = finalizerContext.getException();
this.finalizerResult = finalizerContext.getResult().name();
this.parentJobId = finalizerContext.getAsyncApexJobId();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import LoggerServiceTaskQueue from './loggerServiceTaskQueue';
import getSettings from '@salesforce/apex/ComponentLogger.getSettings';
import saveComponentLogEntries from '@salesforce/apex/ComponentLogger.saveComponentLogEntries';

const CURRENT_VERSION_NUMBER = 'v4.14.14';
const CURRENT_VERSION_NUMBER = 'v4.14.15';

const CONSOLE_OUTPUT_CONFIG = {
messagePrefix: `%c Nebula Logger ${CURRENT_VERSION_NUMBER} `,
Expand Down

0 comments on commit 2745784

Please sign in to comment.