Skip to content

Commit 2894401

Browse files
authored
Custom Field Mappings Support for Lightning Components (#749)
* Added support for custom field mappings in JavaScript via a new function setField() in logEntryBuilder.js * This is equivalent to the Apex method overloads setField() in LogEntryEventBuilder.cls that were introduced in v4.13.14 * Updated the demo lighting components in recipes metadata to set a custom field on LogEntry__c * This provides a quick & easy way to verify that the functionality works for lightning components * Updated README.md to have details about using custom field mappings in JavaScript (lightning components)
1 parent 4fe4c36 commit 2894401

15 files changed

Lines changed: 266 additions & 63 deletions

File tree

README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

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

8-
## Unlocked Package - v4.14.5
8+
## Unlocked Package - v4.14.6
99

10-
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oRXQAY)
11-
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oRXQAY)
10+
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oRhQAI)
11+
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015oRhQAI)
1212
[![View Documentation](./images/btn-view-documentation.png)](https://jongpie.github.io/NebulaLogger/)
1313

14-
`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oRXQAY`
14+
`sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000015oRhQAI`
1515

16-
`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000015oRXQAY`
16+
`sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000015oRhQAI`
1717

1818
---
1919

@@ -590,9 +590,12 @@ Once you've implementing log entry tagging within Apex or Flow, you can choose h
590590

591591
## Adding Custom Fields to Nebula Logger's Data Model
592592

593-
As of `v4.13.14`, Nebula Logger supports 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.
593+
Nebula Logger supports 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.
594594

595-
This feature requires that you populate your custom fields yourself, and is only available in Apex currently. The plan is to add in a future release the ability to also set custom fields via JavaScript & Flow.
595+
This feature requires that you populate your custom fields yourself, and is only available in Apex & JavaScript currently. The plan is to add in a future release the ability to also set custom fields via Flow.
596+
597+
- `v4.13.14` added this functionality for Apex
598+
- `v4.14.6` added this functionality for JavaScript (lightning components)
596599

597600
### Adding Custom Fields to the Platform Event `LogEntryEvent__e`
598601

@@ -604,19 +607,35 @@ The first step is to add a field to the platform event `LogEntryEvent__e`
604607

605608
![Custom Field on LogEntryEvent__e](./images/custom-field-log-entry-event.png)
606609

607-
- Populate your field(s) in Apex by calling the instance method overloads `LogEntryEventBuilder.setField(Schema.SObjectField field, Object fieldValue)` or `LogEntryEventBuilder.setField(Map<Schema.SObjectField, Object> fieldToValue)`
610+
- In Apex, populate your field(s) by calling the instance method overloads `LogEntryEventBuilder.setField(Schema.SObjectField field, Object fieldValue)` or `LogEntryEventBuilder.setField(Map<Schema.SObjectField, Object> fieldToValue)`
608611

609612
```apex
610613
Logger.info('hello, world')
611614
// Set a single field
612615
.setField(LogEntryEvent__e.SomeCustomTextField__c, 'some text value')
613616
// Set multiple fields
614-
.setFields(new Map<Schema.SObjectField, Object>{
617+
.setField(new Map<Schema.SObjectField, Object>{
615618
LogEntryEvent__e.AnotherCustomTextField__c => 'another text value',
616619
LogEntryEvent__e.SomeCustomDatetimeField__c => System.now()
617620
});
618621
```
619622

623+
- In JavaScript, populate your field(s) by calling the instance function `LogEntryEventBuilder.setField(Object fieldToValue)`
624+
625+
```javascript
626+
import { createLogger } from 'c/logger';
627+
628+
export default class LoggerLWCImportDemo extends LightningElement {
629+
logger;
630+
631+
async connectedCallback() {
632+
this.logger = await createLogger();
633+
this.logger.info('Hello, world').setField({ SomeCustomTextField__c: 'some text value', SomeCustomNumbertimeField__c: 123 });
634+
this.logger.saveLog();
635+
}
636+
}
637+
```
638+
620639
### Adding Custom Fields to the Custom Objects `Log__c`, `LogEntry__c`, and `LoggerScenario__c`
621640

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

docs/apex/Logger-Engine/ComponentLogger.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ Context about the user&apos;s browser, automatically captured by Nebula Logger
131131

132132
(Optional) A JavaScript Error to log
133133

134+
###### `fieldToValue``Map<String, Object>`
135+
136+
(Optional) A map containing key-value pairs of fields to set on `LogEntryEvent__e`
137+
134138
###### `loggingLevel``String`
135139

136140
The name of the `LoggingLevel` enum value

docs/lightning-components/LogEntryBuilder.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- [.setRecord(record)](#LogEntryBuilder+setRecord) [<code>LogEntryBuilder</code>](#LogEntryBuilder)
1212
- [.setScenario(scenario)](#LogEntryBuilder+setScenario) [<code>LogEntryBuilder</code>](#LogEntryBuilder)
1313
- [.setError(error)](#LogEntryBuilder+setError) [<code>LogEntryBuilder</code>](#LogEntryBuilder)
14+
- [.setField(fieldToValue)](#LogEntryBuilder+setField) [<code>LogEntryBuilder</code>](#LogEntryBuilder)
1415
- [.parseStackTrace(error)](#LogEntryBuilder+parseStackTrace) [<code>LogEntryBuilder</code>](#LogEntryBuilder)
1516
- [.addTag(tag)](#LogEntryBuilder+addTag) [<code>LogEntryBuilder</code>](#LogEntryBuilder)
1617
- [.addTags(tags)](#LogEntryBuilder+addTags) [<code>LogEntryBuilder</code>](#LogEntryBuilder)
@@ -94,6 +95,19 @@ Sets the log entry event's exception fields
9495
| ----- | ------------------ | -------------------------------------------------------------------------------- |
9596
| error | <code>Error</code> | The instance of a JavaScript `Error` object to use, or an Apex HTTP error to use |
9697

98+
<a name="LogEntryBuilder+setField"></a>
99+
100+
### logEntryBuilder.setField(fieldToValue) [<code>LogEntryBuilder</code>](#LogEntryBuilder)
101+
102+
Sets multiple field values on the builder's `LogEntryEvent__e` record
103+
104+
**Kind**: instance method of [<code>LogEntryBuilder</code>](#LogEntryBuilder)
105+
**Returns**: [<code>LogEntryBuilder</code>](#LogEntryBuilder) - The same instance of `LogEntryBuilder`, useful for chaining methods
106+
107+
| Param | Type | Description |
108+
| ------------ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
109+
| fieldToValue | <code>Object</code> | An object containing the custom field name as a key, with the corresponding value to store. Example: `{"SomeField__c": "some value", "AnotherField__c": "another value"}` |
110+
97111
<a name="LogEntryBuilder+parseStackTrace"></a>
98112

99113
### logEntryBuilder.parseStackTrace(error) [<code>LogEntryBuilder</code>](#LogEntryBuilder)

nebula-logger/core/main/logger-engine/classes/ComponentLogger.cls

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ public inherited sharing class ComponentLogger {
5757
continue;
5858
}
5959

60-
LogEntryEvent__e logEntryEvent = logEntryEventBuilder.setTimestamp(componentLogEntry.timestamp).addTags(componentLogEntry.tags).getLogEntryEvent();
60+
Map<Schema.SObjectField, Object> customFieldToFieldValue = getCustomFieldToFieldValue(componentLogEntry.fieldToValue);
61+
LogEntryEvent__e logEntryEvent = logEntryEventBuilder.setTimestamp(componentLogEntry.timestamp)
62+
.setField(customFieldToFieldValue)
63+
.addTags(componentLogEntry.tags)
64+
.getLogEntryEvent();
6165

6266
if (componentLogEntry.recordId != null) {
6367
logEntryEventBuilder.setRecord(componentLogEntry.recordId);
@@ -83,6 +87,23 @@ public inherited sharing class ComponentLogger {
8387
}
8488
}
8589

90+
private static Map<Schema.SObjectField, Object> getCustomFieldToFieldValue(Map<String, Object> fieldNameToValue) {
91+
Map<Schema.SObjectField, Object> resolvedFieldToFieldValue = new Map<Schema.SObjectField, Object>();
92+
93+
if (fieldNameToValue == null || fieldNameToValue.isEmpty()) {
94+
return resolvedFieldToFieldValue;
95+
}
96+
97+
Map<String, Schema.SObjectField> fieldNameToField = Schema.LogEntryEvent__e.SObjectType.getDescribe().fields.getMap();
98+
for (String fieldName : fieldNameToValue.keySet()) {
99+
Schema.SObjectField field = fieldNameToField.get(fieldName);
100+
if (field != null) {
101+
resolvedFieldToFieldValue.put(field, fieldNameToValue.get(fieldName));
102+
}
103+
}
104+
return resolvedFieldToFieldValue;
105+
}
106+
86107
private static void setBrowserDetails(LogEntryEvent__e logEntryEvent, ComponentLogEntry componentLogEntry) {
87108
logEntryEvent.BrowserAddress__c = LoggerDataStore.truncateFieldValue(Schema.LogEntryEvent__e.BrowserAddress__c, componentLogEntry.browser?.address);
88109
logEntryEvent.BrowserFormFactor__c = LoggerDataStore.truncateFieldValue(
@@ -285,6 +306,11 @@ public inherited sharing class ComponentLogger {
285306
@AuraEnabled
286307
public ComponentError error { get; set; }
287308

309+
/**
310+
* @description (Optional) A map containing key-value pairs of fields to set on `LogEntryEvent__e`
311+
*/
312+
@AuraEnabled
313+
public Map<String, Object> fieldToValue { get; set; }
288314
/**
289315
* @description The name of the `LoggingLevel` enum value
290316
*/

nebula-logger/core/main/logger-engine/classes/Logger.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
global with sharing class Logger {
1616
// There's no reliable way to get the version number dynamically in Apex
1717
@TestVisible
18-
private static final String CURRENT_VERSION_NUMBER = 'v4.14.5';
18+
private static final String CURRENT_VERSION_NUMBER = 'v4.14.6';
1919
private static final System.LoggingLevel FALLBACK_LOGGING_LEVEL = System.LoggingLevel.DEBUG;
2020
private static final List<LogEntryEventBuilder> LOG_ENTRIES_BUFFER = new List<LogEntryEventBuilder>();
2121
private static final String MISSING_SCENARIO_ERROR_MESSAGE = 'No logger scenario specified. A scenario is required for logging in this org.';

nebula-logger/core/main/logger-engine/lwc/logger/__tests__/logger.test.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,28 @@ describe('logger lwc import tests', () => {
163163
expect(logEntry.browser.windowResolution).toEqual(window.innerWidth + ' x ' + window.innerHeight);
164164
});
165165

166+
it('sets multiple custom fields when using recommended import approach', async () => {
167+
getSettings.mockResolvedValue({ ...MOCK_GET_SETTINGS });
168+
const logger = await createLogger();
169+
await logger.getUserSettings();
170+
const logEntryBuilder = logger.info('example log entry');
171+
const logEntry = logEntryBuilder.getComponentLogEntry();
172+
const firstFakeFieldName = 'SomeField__c';
173+
const firstFieldMockValue = 'something';
174+
const secondFakeFieldName = 'AnotherField__c';
175+
const secondFieldMockValue = 'another value';
176+
expect(logEntry.fieldToValue[firstFakeFieldName]).toBeFalsy();
177+
expect(logEntry.fieldToValue[secondFakeFieldName]).toBeFalsy();
178+
179+
logEntryBuilder.setField({
180+
[firstFakeFieldName]: firstFieldMockValue,
181+
[secondFakeFieldName]: secondFieldMockValue
182+
});
183+
184+
expect(logEntry.fieldToValue[firstFakeFieldName]).toEqual(firstFieldMockValue);
185+
expect(logEntry.fieldToValue[secondFakeFieldName]).toEqual(secondFieldMockValue);
186+
});
187+
166188
it('sets recordId when using recommended import approach', async () => {
167189
getSettings.mockResolvedValue({ ...MOCK_GET_SETTINGS });
168190
const logger = await createLogger();
@@ -658,6 +680,29 @@ describe('logger lwc legacy markup tests', () => {
658680
expect(logEntry.browser.windowResolution).toEqual(window.innerWidth + ' x ' + window.innerHeight);
659681
});
660682

683+
it('sets multiple custom fields when using deprecated markup approach', async () => {
684+
getSettings.mockResolvedValue({ ...MOCK_GET_SETTINGS });
685+
const logger = createElement('c-logger', { is: Logger });
686+
document.body.appendChild(logger);
687+
await flushPromises();
688+
const logEntryBuilder = await logger.info('example log entry');
689+
const logEntry = logEntryBuilder.getComponentLogEntry();
690+
const firstFakeFieldName = 'SomeField__c';
691+
const firstFieldMockValue = 'something';
692+
const secondFakeFieldName = 'AnotherField__c';
693+
const secondFieldMockValue = 'another value';
694+
expect(logEntry.fieldToValue[firstFakeFieldName]).toBeFalsy();
695+
expect(logEntry.fieldToValue[secondFakeFieldName]).toBeFalsy();
696+
697+
logEntryBuilder.setField({
698+
[firstFakeFieldName]: firstFieldMockValue,
699+
[secondFakeFieldName]: secondFieldMockValue
700+
});
701+
702+
expect(logEntry.fieldToValue[firstFakeFieldName]).toEqual(firstFieldMockValue);
703+
expect(logEntry.fieldToValue[secondFakeFieldName]).toEqual(secondFieldMockValue);
704+
});
705+
661706
it('sets recordId when using deprecated markup approach', async () => {
662707
getSettings.mockResolvedValue({ ...MOCK_GET_SETTINGS });
663708
const logger = createElement('c-logger', { is: Logger });

nebula-logger/core/main/logger-engine/lwc/logger/logEntryBuilder.js

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import FORM_FACTOR from '@salesforce/client/formFactor';
66
import { log as lightningLog } from 'lightning/logger';
77
import { LoggerStackTrace } from './loggerStackTrace';
88

9-
const CURRENT_VERSION_NUMBER = 'v4.14.5';
9+
const CURRENT_VERSION_NUMBER = 'v4.14.6';
1010

1111
const LOGGING_LEVEL_EMOJIS = {
1212
ERROR: '⛔',
@@ -19,27 +19,19 @@ const LOGGING_LEVEL_EMOJIS = {
1919
};
2020

2121
const ComponentBrowser = class {
22-
address = null;
23-
formFactor = null;
24-
language = null;
25-
screenResolution = null;
26-
userAgent = null;
27-
windowResolution = null;
28-
29-
constructor() {
30-
this.address = window.location.href;
31-
this.formFactor = FORM_FACTOR;
32-
this.language = window.navigator.language;
33-
this.screenResolution = window.screen.availWidth + ' x ' + window.screen.availHeight;
34-
this.userAgent = window.navigator.userAgent;
35-
this.windowResolution = window.innerWidth + ' x ' + window.innerHeight;
36-
}
22+
address = window.location.href;
23+
formFactor = FORM_FACTOR;
24+
language = window.navigator.language;
25+
screenResolution = window.screen.availWidth + ' x ' + window.screen.availHeight;
26+
userAgent = window.navigator.userAgent;
27+
windowResolution = window.innerWidth + ' x ' + window.innerHeight;
3728
};
3829

3930
// JavaScript equivalent to the Apex class ComponentLogger.ComponentLogEntry
4031
const ComponentLogEntry = class {
4132
browser = new ComponentBrowser();
4233
error = null;
34+
fieldToValue = {};
4335
loggingLevel = null;
4436
message = null;
4537
originStackTrace = null;
@@ -138,6 +130,24 @@ const LogEntryBuilder = class {
138130
return this;
139131
}
140132

133+
/**
134+
* @description Sets multiple field values on the builder's `LogEntryEvent__e` record
135+
* @param {Object} fieldToValue An object containing the custom field name as a key, with the corresponding value to store.
136+
* Example: `{"SomeField__c": "some value", "AnotherField__c": "another value"}`
137+
* @return {LogEntryBuilder} The same instance of `LogEntryBuilder`, useful for chaining methods
138+
*/
139+
setField(fieldToValue) {
140+
if (!fieldToValue) {
141+
return this;
142+
}
143+
144+
Object.keys(fieldToValue).forEach(fieldName => {
145+
this.#componentLogEntry.fieldToValue[fieldName] = fieldToValue[fieldName];
146+
});
147+
148+
return this;
149+
}
150+
141151
/**
142152
* @description Parses the provided error's stack trace and sets the log entry's origin & stack trace fields
143153
* @param {Error} error The instance of a JavaScript `Error` object with a stack trace to parse

nebula-logger/core/tests/logger-engine/classes/ComponentLogger_Tests.cls

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,60 @@ private class ComponentLogger_Tests {
119119
System.Assert.isNull(publishedLogEntryEvent.BrowserWindowResolution__c);
120120
}
121121

122+
@IsTest
123+
static void it_should_save_component_log_entry_with_valid_custom_fields() {
124+
LoggerStackTrace.ignoreOrigin(ComponentLogger_Tests.class);
125+
LoggerDataStore.setMock(LoggerMockDataStore.getEventBus());
126+
ComponentLogger.ComponentLogEntry componentLogEntry = createMockComponentLogEntry();
127+
// Realistically, people shouldn't/wouldn't set fields like HttpRequestBody__c or HttpRequestMethod__c...
128+
// But to avoid adding an extra field just for test purposes, we'll use some existing fields
129+
componentLogEntry.fieldToValue = new Map<String, Object>{
130+
Schema.LogEntryEvent__e.HttpRequestBody__c.getDescribe().getName() => 'some value',
131+
Schema.LogEntryEvent__e.HttpRequestMethod__c.getDescribe().getName() => 'another value'
132+
};
133+
System.Assert.areEqual(0, Logger.saveLogCallCount);
134+
System.Assert.areEqual(0, LoggerMockDataStore.getEventBus().getPublishCallCount());
135+
System.Assert.areEqual(0, LoggerMockDataStore.getEventBus().getPublishedPlatformEvents().size());
136+
137+
ComponentLogger.saveComponentLogEntries(new List<ComponentLogger.ComponentLogEntry>{ componentLogEntry }, null);
138+
139+
LogEntryEvent__e publishedLogEntryEvent = (LogEntryEvent__e) LoggerMockDataStore.getEventBus().getPublishedPlatformEvents().get(0);
140+
System.Assert.areEqual('some value', publishedLogEntryEvent.HttpRequestBody__c);
141+
System.Assert.areEqual('another value', publishedLogEntryEvent.HttpRequestMethod__c);
142+
}
143+
144+
@IsTest
145+
static void it_should_save_component_log_entry_with_invalid_custom_fields() {
146+
LoggerStackTrace.ignoreOrigin(ComponentLogger_Tests.class);
147+
LoggerDataStore.setMock(LoggerMockDataStore.getEventBus());
148+
ComponentLogger.ComponentLogEntry componentLogEntry = createMockComponentLogEntry();
149+
componentLogEntry.fieldToValue = new Map<String, Object>{ 'Some Fake Field That Definitely Will Never Exist' => 'some value' };
150+
System.Assert.areEqual(0, Logger.saveLogCallCount);
151+
System.Assert.areEqual(0, LoggerMockDataStore.getEventBus().getPublishCallCount());
152+
System.Assert.areEqual(0, LoggerMockDataStore.getEventBus().getPublishedPlatformEvents().size());
153+
154+
ComponentLogger.saveComponentLogEntries(new List<ComponentLogger.ComponentLogEntry>{ componentLogEntry }, null);
155+
156+
LogEntryEvent__e publishedLogEntryEvent = (LogEntryEvent__e) LoggerMockDataStore.getEventBus().getPublishedPlatformEvents().get(0);
157+
System.Assert.isNotNull(publishedLogEntryEvent);
158+
}
159+
160+
@IsTest
161+
static void it_should_save_component_log_entry_without_custom_fields() {
162+
LoggerStackTrace.ignoreOrigin(ComponentLogger_Tests.class);
163+
LoggerDataStore.setMock(LoggerMockDataStore.getEventBus());
164+
ComponentLogger.ComponentLogEntry componentLogEntry = createMockComponentLogEntry();
165+
componentLogEntry.fieldToValue = null;
166+
System.Assert.areEqual(0, Logger.saveLogCallCount);
167+
System.Assert.areEqual(0, LoggerMockDataStore.getEventBus().getPublishCallCount());
168+
System.Assert.areEqual(0, LoggerMockDataStore.getEventBus().getPublishedPlatformEvents().size());
169+
170+
ComponentLogger.saveComponentLogEntries(new List<ComponentLogger.ComponentLogEntry>{ componentLogEntry }, null);
171+
172+
LogEntryEvent__e publishedLogEntryEvent = (LogEntryEvent__e) LoggerMockDataStore.getEventBus().getPublishedPlatformEvents().get(0);
173+
System.Assert.isNotNull(publishedLogEntryEvent);
174+
}
175+
122176
@IsTest
123177
static void it_should_save_component_log_entry_with_queueable_job() {
124178
LoggerStackTrace.ignoreOrigin(ComponentLogger_Tests.class);

nebula-logger/recipes/aura/loggerAuraEmbedDemo/loggerAuraEmbedDemo.cmp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
access="global"
33
implements="forceCommunity:availableForAllPageTypes,flexipage:availableForAllPageTypes,force:appHostable,force:lightningQuickAction,lightning:availableForFlowScreens"
44
>
5-
<c:logger aura:id="logger" />
6-
75
<aura:attribute name="logMessage" type="String" default="Something to log" />
86

7+
<c:logger aura:id="logger" />
8+
99
<lightning:card title="Nebula Logger for Aura Components" iconName="custom:custom19">
1010
<div class="slds-var-m-around_medium">This component demonstrates how to use Nebula Logger in Aura components</div>
1111
<div class="slds-var-m-around_medium">
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* eslint-disable no-console, no-unused-expressions */
22
({
33
saveLogExample: function (component) {
4-
console.log("start of aura cmp's saveLog function");
4+
console.log("start of aura cmp's saveLogExample function");
55

66
const logger = component.find('logger');
77
console.log(logger);
8-
logger.info(component.get('{!v.logMessage}'));
8+
logger.info(component.get('{!v.logMessage}')).setField({ SomeLogEntryField__c: 'some text from loggerAuraEmbedDemo' });
99
logger.saveLog();
1010
}
1111
});

0 commit comments

Comments
 (0)