Skip to content
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

Allow to provide colorizers for specific output channels #19561

Closed
formulahendry opened this issue Jan 29, 2017 · 13 comments · Fixed by #140876
Closed

Allow to provide colorizers for specific output channels #19561

formulahendry opened this issue Jan 29, 2017 · 13 comments · Fixed by #140876
Assignees
Labels
api api-finalization feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan output Output channel system issues
Milestone

Comments

@formulahendry
Copy link
Member

  • VSCode Version: 1.8
  • OS Version: All

One user of my Code Runner extension reported this issue: formulahendry/vscode-code-runner#59

Steps to Reproduce:

  1. Install Output Colorizer
  2. Install Code Runner

Result:

IBM's Output Colorizer extension is no longer working.

Both of us using text/x-code-output (https://github.com/formulahendry/vscode-code-runner/blob/master/package.json#L197 , https://github.com/IBM-Bluemix/vscode-log-output-colorizer/blob/master/package.json#L4)
Not sure there is a way to avoid the color highlight of one extension overwriting another? Could the color highlight exsit for both extension?

@bpasero
Copy link
Member

bpasero commented Jan 30, 2017

As far as I understand, this issue asks about having colorisation from both extensions working on the same mime type. That is something we do not support.

@formulahendry am I understanding this correctly that you want your extension to only colorize the output from your extension but would want the IBM one to be used for all other output channels?

@bpasero bpasero self-assigned this Jan 30, 2017
@bpasero bpasero added the info-needed Issue requires more information from poster label Jan 30, 2017
@bpasero bpasero added this to the Backlog milestone Jan 30, 2017
@formulahendry
Copy link
Member Author

Hi @bpasero , you are right. That's what we want.

@bpasero bpasero added api feature-request Request for new features or functionality and removed info-needed Issue requires more information from poster labels Jan 30, 2017
@bpasero bpasero changed the title Conflicts with Output Colorizer extension Allow to provide colorizers for specific output channels Jan 30, 2017
@bpasero bpasero removed this from the Backlog milestone Jan 30, 2017
@bpasero
Copy link
Member

bpasero commented Jan 30, 2017

Ok, I have updated the summary. It would be cool if there was some kind of hierarchy in the output channel coloring where an extension could override the coloring for one channel the extension itself provides.

/cc @alexandrudima @aeschli

@bpasero bpasero removed their assignment Jan 31, 2017
@ArtemGovorov
Copy link
Contributor

Here's the related feature request that ultimately addresses this one: #11005. If it was possible to assign a language to an output channel, it would be perfect.

@benrr101
Copy link

benrr101 commented Mar 1, 2018

+1 for this issue
However, @ArtemGovorov I don't think #11005 would solve this issue. I'm looking for a way to append lines to the output that don't adhere to a specific language and color them on the fly. For instance, I'm outputting the stdout and stderr I get back from a spawn call. I'd like to color the stderr to draw the user's attention to it.

@ghost
Copy link

ghost commented Jun 17, 2020

I was looking for a feature that does this as well 👀

@SounD120
Copy link

SounD120 commented Oct 20, 2020

Hi @bpasero . React Native Tools extension team here. Recently we started to investigate how we can improve logging in the extension and found out that there is no consistent way to colorize output logs in VS Code, so we would like to reboot this conversation.

We tried to add grammars which are specific for our extension but it seems that they will also be used by other extensions that are installed even if the React Native Tools is not activated.
Also we tried to use VS Code Programmatic language features to register grammars only after the extension activation to reduce side effects, but it seems that currently VS Code doesn't provide an ability to add such grammars in runtime. But even if it is possible, the problem when one grammar overlaps another still persists, because all the output channels are of the same mime type.

So we think that this feature might be interesting not only for the React Native Tools, but also for other extensions since it provides enhanced logs readability and helps to mark warnings and errors with special color codes and might help to decrease the amount of issues due to 'not enough informative logs' and other similar reasons.

@SounD120
Copy link

Hey @bpasero. We are looking forward to discuss this topic.
FYI @connor4312 , @EricCornelson.

@bpasero bpasero added the output Output channel system issues label Oct 26, 2020
@bpasero bpasero added this to the Backlog milestone Oct 26, 2020
@bpasero
Copy link
Member

bpasero commented Oct 26, 2020

@SounD120 I think this is a fair feature request and it should be in "Backlog" to signal this. However we have a couple of thousand other issues also in "Backlog" that we also need to consider. If you want to push this onto our agenda for a milestone, you need to connect with PMs/devleads from our team if possible. Thanks for understanding.

@SounD120
Copy link

@bpasero Sounds good, thanks!

@sandy081
Copy link
Member

sandy081 commented Feb 8, 2022

Thanks to @gjsjohnmurray for contributing the PR to support languages to the Output Channel. Here is the proposal

               /**
 		 * Creates a new {@link OutputChannel output channel} with the given name.
 		 *
 		 * @param name Human-readable string which will be used to represent the channel in the UI.
 		 * @param languageId The identifier of the language associated with the channel.
 		 */
 		export function createOutputChannel(name: string, languageId?: string): OutputChannel;

sandy081 added a commit that referenced this issue Feb 9, 2022
Add optional languageId to window.createOutputChannel API (#19561)
@sandy081 sandy081 reopened this Feb 9, 2022
@sandy081
Copy link
Member

sandy081 commented Feb 9, 2022

API proposal is pushed to main branch. Will give some time for testing and finalize in next month.

@sandy081
Copy link
Member

sandy081 commented Mar 8, 2022

API is made public and will be available from next release (1.66.0)

@github-actions github-actions bot locked and limited conversation to collaborators Apr 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api api-finalization feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan output Output channel system issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants
@benrr101 @bpasero @ArtemGovorov @formulahendry @sandy081 @SounD120 and others