Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Replace vscode-debug-logger dep with LoggingSession from vscode-debugadapter #858

Closed
roblourens opened this issue Mar 11, 2017 · 4 comments
Assignees
Labels

Comments

@roblourens
Copy link
Member

I should do this at some point, as the stuff from vscode-debug-logger has been moved into the official vscode-debugadapter lib.

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Dec 31, 2018

@roblourens We moved to using LoggingDebugSession with @brycekahle 's work in #2081. A few questions:

  • It provides a lot more details, any way of controlling it?
  • The colors are gone :( Anyway to colorize the output?

Before:

image

After:

image

@ramya-rao-a ramya-rao-a reopened this Dec 31, 2018
@roblourens
Copy link
Member Author

It also logs traffic to and from the debug adapter. If you don't want to see it, those messages are "Verbose", so you could use a higher log level for your own messages, then set the log level to exclude Verbose messages.

Errors are red, warnings are yellow, everything else is the default color. If you really want to, you should be able to wrap your log messages in color escape codes (https://www.npmjs.com/package/color) and those should be applied to the console.

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Jan 1, 2019

Thanks @roblourens

Pushed a change to update the trace attribute to take one of 3 values

  • verbose: logs traffic between vscode and the debug adapter + anything logged by the debug adapter itself. Logs to file as well
  • log: shows only logs by the debug adapter (corresponds to the older "verbose"). Logs to file as well
  • error: shows only errors (corresponds to the older scenario where trace was not set to anything by the user)

The previous option to have verbose logs logged to file but not shown in the debug console is deprecated as we havent seen that being used as much as showing the verbose logs in the debug console + file logging.

@brycekahle, @segevfiner,
Can you try out the newer log levels above (from the master branch) and share any feedback you have?

@ramya-rao-a
Copy link
Contributor

Turns out the older vscode-debug-logger was using the category console which logged everything as a yellow warning.

But vscode-debugadapter only logs things meant as warning to use the category console and so our color went away.

See 105de16#r31811317 (Thanks @segevfiner!)

To get around this, I'll be logging things from the debug adapter using log.warn to keep things consistent as before i.e yellow.

This is important to differentiate the logs when in the new "verbose" mode

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants