-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(engine): identify LWC console logs #674
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this but:
- there are test failures
- LWC is a brand that is not ready to be public, adding this to the logs mean that people will start asking about LWC even though they are only using Aura on their end. /cc @diervo
@@ -67,7 +67,7 @@ const assert = { | |||
throw new Error(msg); | |||
}, | |||
logError(message: string, elm: Element | null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change type of the logError
and logWarning
function to be undefined
instead of null
:
function logWarning(message: string, elm?: Element) {}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a quick code search in the engine to make sure we are not missing any error message, there is still console.error
in def.ts
. Can you make the change and add it to this PR?
@@ -67,7 +67,7 @@ const assert = { | |||
throw new Error(msg); | |||
}, | |||
logError(message: string, elm: Element | null) { | |||
let msg = message; | |||
let msg = `[LWC err]: ${message}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about using error
and warning
there, instead of the shorthand?
72f857f
to
4a54e71
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked to @pmdartus we are fine with this PR.
Given that in 218 when this goes live LWC will be life this is ok.
c6f58c5
to
b1a34f9
Compare
Benchmark resultsBase commit: lwc-engine-benchmark
|
Benchmark resultsBase commit: lwc-engine-benchmark
|
@jodarove LGTM |
Benchmark resultsBase commit: lwc-engine-benchmark
|
Benchmark resultsBase commit: lwc-engine-benchmark
|
Adds [LWC error/warning] prefix to clearly identify LWC's console logs
a3c9a5b
to
2242add
Compare
Benchmark resultsBase commit: |
Benchmark resultsBase commit: lwc-engine-benchmark
|
Details
Adds [LWC err/warn] prefix in
assert.logError
andassert.logWarning
to clearly identify LWC's console logsDoes this PR introduce a breaking change?