NebulaLogger
NebulaLogger copied to clipboard
LWC Component Name doesn't populate when creating a log from LWC
Package Edition of Nebula Logger
Unlocked Package
Package Version of Nebula Logger
4.7.8
New Bug Summary
Creating a log from an LWC using the following code:
const logger = this.template.querySelector('c-logger');
logger.error(errorMessage)
logger.saveLog();
Creates a Log and Log Entry record, but although the Log Entry recognises the Component Type as an LWC, the Component Name doesn't get populated.
![Screenshot 2022-08-04 at 22 07 51](https://user-images.githubusercontent.com/30699031/182952901-c01f9fa7-e82a-4112-a638-c549932a63aa.png)
@EllieAtWHL thanks so much for reporting this! It looks like Salesforce might have recently changed some of the JavaScript stack traces for LWC, which has broken the parsing of the component name & function. I'll try to get this resolved ASAP!
@EllieAtWHL I was able to get this fixed last night, it'll be included in the next release v4.8.0 - I'm hoping it have it released in the next few days.
I am seeing this issue with v4.11 :-(
Facing Same issue with v4.11.12
@skostojohn and @monika-gupta-erudite could you both check to see if you have Lighting Web Security (LWS) enabled in your orgs? I think some recent changes in LWS (and possibly the older Locker Service) have broken stack traces again, which are used to determine the component name.
You can check in your org, under Setup --> Session Settings, to see if LWS has been enabled in your orgs.
I'm also reopening this issue, since it seems to be a widespread problem.
@jongpie Thanks for a quick reply. I enabled LWS in my org based on your suggestion but still facing same issue.
@skostojohn and @monika-gupta-erudite I've released another fix for this issue in v4.12.7
. I'm hoping this solves the issue, but please let me know if you run into any more issues with it.