Skip to content

Logging consolidation - Remove window.console and console. calls #9721

Closed

Description

From the #9611 spike for #8527

Remove direct calls to window.console.([log|warn|info|error]), replace them with trace[Verbose|Warn|Info|Error] or @traceDecorators.

⚠️ The DS part of the extension overrides window.console with their own messaging API, so make sure we don't impact them.

Activity

  1. ghost added
    triage-neededNeeds assignment to the proper sub-team
    on Jan 22, 2020
  2. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Jan 22, 2020
  3. karthiknadig commented on Jan 27, 2020

    @karthiknadig
    Member

    Check for console.log as well.

  4. karthiknadig commented on Jan 27, 2020

    @karthiknadig
    Member

    Direct uses of console.

    • DS - create an HTTP server to serve up React UI - Rewires console. calls to post messages to the web panel
      • datascience-ui/react-common/postOffice.ts - console. calls overriden here
      • webPanel.ts - console.log
      • webPanelServer.ts- console.log
      • datascience-ui/react-common/logger.ts - console.log
    • src/test/:
      • exitCIAfterTestReporter.ts: for tests (CI/AzDO)
      • utils/ts: for functional tests
      • debuggerTest.ts: for debugger tests
      • datascience/: DS tests
    • featureDeprecationManager.ts: notify deprecation (console.error) ➡️ can be moved to an output channel
    • socketServer.ts: error in socket server (console.error) ➡️ can be deleted
    • debugStreamProvider.ts: DA logging for third-party extension devs (console.error) ➡️ can be moved to a debug output channel
    • LocalDebugClient.ts: debugging error logging (console.error) ➡️ can be moved to a debug output channel
    • intellisenseDocument.ts: DS autocompletion (console.warn)
    • container.ts: for tests (console.warn) ➡️ use a logging function instead
  5. karthiknadig commented on Jan 27, 2020

    @karthiknadig
    Member

    Spoke to the DS team. We should not be replacing console.log inside DataScience-ui/react*

  6. karthiknadig commented on Jan 30, 2020

    @karthiknadig
    Member

    Data science portion of this will be cleaned up via #9832

  7. karthiknadig commented on Jan 30, 2020

    @karthiknadig
    Member

    Not making change to anything under debugAdapter. Since we are going to phase it out.

  8. changed the title [-]Logging consolidation - Remove `window.console` calls[/-] [+]Logging consolidation - Remove `window.console` and `console.` calls[/+] on Nov 4, 2021
  9. eleanorjboyd commented on Dec 11, 2024

    @eleanorjboyd

    took a look and these are the only places left with console.. Any of them worth keeping around or can I put in a PR to switch them all to trace?

    Image

    Anthony Kim (@anthonykim1)
    Karthik Nadig (@karthiknadig)

  10. karthiknadig commented on Dec 17, 2024

    @karthiknadig
    Member

    These can all be switched to trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-diagnosticsLogging/Features to facilitate diagnosing user problemsdebtCode quality issuesneeds PRReady to be worked on

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions