-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add logging of class and method names into Logger #22398
Conversation
Signed-off-by: mdolhalo <[email protected]>
Signed-off-by: mdolhalo <[email protected]>
@nallikaea : it would be interesting to see how will error or warning message look like. Would you please share anyone? |
https://github.com/eclipse/che/actions/runs/5925319878/job/16064524673 |
Thank you, @nallikaea I had also triggered devspaces tests from this PR https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/Testing/job/e2e/job/basic/job/typescript-tests/11393/ and found lots of Also, am I understand correctly, that next method call can't be identified automatically and so should be written up explicitly in the code? :
|
returns: Context.anonimus - some message
returns: Context.anonimus - EditorView().openEditor(${extensionsListFileName}) maybe we can delete it because monaco-page-object library has own logger and will tell us something in case of error. |
const e: Error = new Error(); | ||
const stack: string[] = e.stack ? e.stack.split('\n') : []; | ||
// " at functionName ( ..." => "functionName" | ||
return stack[3].replace(/^\s+at\s+(.+?)\s.+/g, '$1'); |
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 about don't logging Context.<anonymous>
and Runner.<anonymous>
to make log cleaner?
stack[3].replace(/^\s+at\s+(.+?)\s.+/g, '$1')
.replace('Context.<anonymous>', '')
.replace('Runner.<anonymous> ', '')
E.g.:
✔ Get recommended extensions list from extensions.json (10623ms)
▼ Context.<anonymous> - ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.
✔ Open "Extensions" view section (1885ms)
• Context.<anonymous> - Time for extensions installation TimeoutConstants.TS_COMMON_PLUGIN_TEST_TIMEOUT=30000
‣ DriverHelper.wait - (30000 milliseconds)
✔ Let extensions complete installation (30003ms)
▼ Context.<anonymous> - ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): get current section.
‣ DriverHelper.waitAllPresence - By(css selector, .name)
• Context.<anonymous> - Check if {"publisher":"ms-python","name":"python"} are installed.
▼ Context.<anonymous> - extensionSection.findItem(python).
‣ DriverHelper.isVisible - By(xpath, //a[text()='Reload Required'])
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): switch to marketplace section.
‣ DriverHelper.waitVisibility - By(css selector, .monaco-list-rows)
‣ DriverHelper.waitVisibility - element is located and is visible.
▼ Context.<anonymous> - marketplaceSection.getVisibleItems(): get all found items.
▼ Context.<anonymous> - Try to find extension published by ms-python.
▼ Context.<anonymous> - Extension was found: Black Formatter
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled()
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled(): true.
▼ Context.<anonymous> - itemWithRightNameAndPublisher.manage(): get context menu.
▼ Context.<anonymous> - ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): get current section.
‣ DriverHelper.waitAllPresence - By(css selector, .name)
• Context.<anonymous> - Check if {"publisher":"ms-python","name":"python"} are installed.
▼ Context.<anonymous> - extensionSection.findItem(python).
‣ DriverHelper.isVisible - By(xpath, //a[text()='Reload Required'])
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): switch to marketplace section.
‣ DriverHelper.waitVisibility - By(css selector, .monaco-list-rows)
‣ DriverHelper.waitVisibility - element is located and is visible.
▼ Context.<anonymous> - marketplaceSection.getVisibleItems(): get all found items.
▼ Context.<anonymous> - Try to find extension published by ms-python.
▼ Context.<anonymous> - Extension was found: Black Formatter
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled()
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled(): true.
▼ Context.<anonymous> - itemWithRightNameAndPublisher.manage(): get context menu.
▼ Context.<anonymous> - ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): get current section.
‣ DriverHelper.waitAllPresence - By(css selector, .name)
• Context.<anonymous> - Check if {"publisher":"ms-python","name":"python"} are installed.
▼ Context.<anonymous> - extensionSection.findItem(python).
‣ DriverHelper.isVisible - By(xpath, //a[text()='Reload Required'])
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): switch to marketplace section.
‣ DriverHelper.waitVisibility - By(css selector, .monaco-list-rows)
‣ DriverHelper.waitVisibility - element is located and is visible.
▼ Context.<anonymous> - marketplaceSection.getVisibleItems(): get all found items.
▼ Context.<anonymous> - Try to find extension published by ms-python.
▼ Context.<anonymous> - Extension was found: Black Formatter
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled()
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled(): true.
▼ Context.<anonymous> - itemWithRightNameAndPublisher.manage(): get context menu.
▼ Context.<anonymous> - ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): get current section.
‣ DriverHelper.waitAllPresence - By(css selector, .name)
• Context.<anonymous> - Check if {"publisher":"ms-python","name":"python"} are installed.
▼ Context.<anonymous> - extensionSection.findItem(python).
‣ DriverHelper.isVisible - By(xpath, //a[text()='Reload Required'])
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): switch to marketplace section.
‣ DriverHelper.waitVisibility - By(css selector, .monaco-list-rows)
‣ DriverHelper.waitVisibility - element is located and is visible.
▼ Context.<anonymous> - marketplaceSection.getVisibleItems(): get all found items.
▼ Context.<anonymous> - Try to find extension published by ms-python.
▼ Context.<anonymous> - Extension was found: Black Formatter
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled()
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled(): true.
▼ Context.<anonymous> - itemWithRightNameAndPublisher.manage(): get context menu.
▼ Context.<anonymous> - ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): get current section.
‣ DriverHelper.waitAllPresence - By(css selector, .name)
• Context.<anonymous> - Check if {"publisher":"ms-python","name":"python"} are installed.
▼ Context.<anonymous> - extensionSection.findItem(python).
‣ DriverHelper.isVisible - By(xpath, //a[text()='Reload Required'])
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): switch to marketplace section.
‣ DriverHelper.waitVisibility - By(css selector, .monaco-list-rows)
‣ DriverHelper.waitVisibility - element is located and is visible.
▼ Context.<anonymous> - marketplaceSection.getVisibleItems(): get all found items.
▼ Context.<anonymous> - Try to find extension published by ms-python.
▼ Context.<anonymous> - Extension was found: Black Formatter
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled()
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled(): true.
▼ Context.<anonymous> - itemWithRightNameAndPublisher.manage(): get context menu.
▼ Context.<anonymous> - ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): get current section.
‣ DriverHelper.waitAllPresence - By(css selector, .name)
• Context.<anonymous> - Check if {"publisher":"ms-python","name":"python"} are installed.
▼ Context.<anonymous> - extensionSection.findItem(python).
‣ DriverHelper.isVisible - By(xpath, //a[text()='Reload Required'])
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): switch to marketplace section.
‣ DriverHelper.waitVisibility - By(css selector, .monaco-list-rows)
‣ DriverHelper.waitVisibility - element is located and is visible.
▼ Context.<anonymous> - marketplaceSection.getVisibleItems(): get all found items.
▼ Context.<anonymous> - Try to find extension published by ms-python.
▼ Context.<anonymous> - Extension was found: Black Formatter
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled()
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled(): true.
▼ Context.<anonymous> - itemWithRightNameAndPublisher.manage(): get context menu.
▼ Context.<anonymous> - ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): get current section.
‣ DriverHelper.waitAllPresence - By(css selector, .name)
• Context.<anonymous> - Check if {"publisher":"ms-python","name":"python"} are installed.
▼ Context.<anonymous> - extensionSection.findItem(python).
‣ DriverHelper.isVisible - By(xpath, //a[text()='Reload Required'])
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): switch to marketplace section.
‣ DriverHelper.waitVisibility - By(css selector, .monaco-list-rows)
‣ DriverHelper.waitVisibility - element is located and is visible.
▼ Context.<anonymous> - marketplaceSection.getVisibleItems(): get all found items.
▼ Context.<anonymous> - Try to find extension published by ms-python.
▼ Context.<anonymous> - Extension was found: Black Formatter
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled()
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled(): true.
▼ Context.<anonymous> - itemWithRightNameAndPublisher.manage(): get context menu.
▼ Context.<anonymous> - ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): get current section.
‣ DriverHelper.waitAllPresence - By(css selector, .name)
• Context.<anonymous> - Check if {"publisher":"ms-python","name":"python"} are installed.
▼ Context.<anonymous> - extensionSection.findItem(python).
‣ DriverHelper.isVisible - By(xpath, //a[text()='Reload Required'])
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): switch to marketplace section.
‣ DriverHelper.waitVisibility - By(css selector, .monaco-list-rows)
‣ DriverHelper.waitVisibility - element is located and is visible.
▼ Context.<anonymous> - marketplaceSection.getVisibleItems(): get all found items.
▼ Context.<anonymous> - Try to find extension published by ms-python.
▼ Context.<anonymous> - Extension was found: Black Formatter
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled()
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled(): true.
▼ Context.<anonymous> - itemWithRightNameAndPublisher.manage(): get context menu.
▼ Context.<anonymous> - ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): get current section.
‣ DriverHelper.waitAllPresence - By(css selector, .name)
• Context.<anonymous> - Check if {"publisher":"ms-python","name":"python"} are installed.
▼ Context.<anonymous> - extensionSection.findItem(python).
‣ DriverHelper.isVisible - By(xpath, //a[text()='Reload Required'])
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): switch to marketplace section.
‣ DriverHelper.waitVisibility - By(css selector, .monaco-list-rows)
‣ DriverHelper.waitVisibility - element is located and is visible.
▼ Context.<anonymous> - marketplaceSection.getVisibleItems(): get all found items.
▼ Context.<anonymous> - Try to find extension published by ms-python.
▼ Context.<anonymous> - Extension was found: Black Formatter
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled()
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled(): true.
▼ Context.<anonymous> - itemWithRightNameAndPublisher.manage(): get context menu.
▼ Context.<anonymous> - ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): get current section.
‣ DriverHelper.waitAllPresence - By(css selector, .name)
• Context.<anonymous> - Check if {"publisher":"ms-python","name":"python"} are installed.
▼ Context.<anonymous> - extensionSection.findItem(python).
‣ DriverHelper.isVisible - By(xpath, //a[text()='Reload Required'])
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): switch to marketplace section.
‣ DriverHelper.waitVisibility - By(css selector, .monaco-list-rows)
‣ DriverHelper.waitVisibility - element is located and is visible.
▼ Context.<anonymous> - marketplaceSection.getVisibleItems(): get all found items.
▼ Context.<anonymous> - Try to find extension published by ms-python.
▼ Context.<anonymous> - Extension was found: Black Formatter
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled()
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled(): true.
▼ Context.<anonymous> - itemWithRightNameAndPublisher.manage(): get context menu.
▼ Context.<anonymous> - ActivityBar().getViewControl('Extensions'))?.openView(): open Extensions view.
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): get current section.
‣ DriverHelper.waitAllPresence - By(css selector, .name)
• Context.<anonymous> - Check if {"publisher":"ms-python","name":"python"} are installed.
▼ Context.<anonymous> - extensionSection.findItem(python).
‣ DriverHelper.isVisible - By(xpath, //a[text()='Reload Required'])
▼ Context.<anonymous> - extensionsView?.getContent().getSections(): switch to marketplace section.
‣ DriverHelper.waitVisibility - By(css selector, .monaco-list-rows)
‣ DriverHelper.waitVisibility - element is located and is visible.
▼ Context.<anonymous> - marketplaceSection.getVisibleItems(): get all found items.
▼ Context.<anonymous> - Try to find extension published by ms-python.
▼ Context.<anonymous> - Extension was found: Black Formatter
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled()
▼ Context.<anonymous> - itemWithRightNameAndPublisher?.isInstalled(): true.
▼ Context.<anonymous> - itemWithRightNameAndPublisher.manage(): get context menu.
1) Check if extensions are installed and enabled
[ERROR] Runner.<anonymous> - CheReporter runner.on.fail: Check if recommended extensions installed for Ansible Check if extensions are installed and enabled failed after 3346ms
‣ Runner.<anonymous> - FullTitle:Check if recommended extensions installed for Ansible Check if extensions are installed and enabled
‣ Runner.<anonymous> - FullTitleSanitized:Check_if_recommended_extensions_installed_for_Ansible_Check_if_extensions_are_installed_and_enabled
‣ Runner.<anonymous> - TestTitle:Check if extensions are installed and enabled
‣ Runner.<anonymous> - TestTitleSanitized:Check_if_extensions_are_installed_and_enabled
‣ DriverHelper.getDriver
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 does this PR do?
resolve #22204
reformat code
Screenshot/screencast of this PR
What issues does this PR fix or reference?
resolve #22204
How to test this PR?
You can check new logs in Empty Workspase GitHub Action
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.