Skip to content

tsserver logging #36

Closed
Closed
@dagda1

Description

@dagda1

Is your feature request related to a problem? Please describe.
There is no logging throughout the plugin and errors are just getting swallowed, for example in cssSnapshots, the catch block returns {}.

    return extractICSS(processedCss.root).icssExports;
  } catch (e) {
    return {};
  }

It took a lot of painstaking logging to find out that an exception was being swallowed.

Describe the solution you'd like

There is a logger that gets passed into the create function as part of the info object, e.g.

  function create(info) {
      var logger = info.project.projectService.logger;

There is a TSS_LOG environment variable that when set allows you to log to the console or a file, e.g.

export TSS_LOG="-level verbose -file /Users/me/.tslog"

You can then see the log messages, it took me a long time to find the actual error.

This is not a criticism, thank you for writing this library, I think it most needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions