'redirect console.log messages to an output channel

how can I configure my extension to write all conselo.log}info|debug messages to an outputchannel ? this seems to be the default for LSP Extensions See this issue where it was broken and then fixed, however I have not been able to find how set this configuration for a regular extension.

Clearly it is possible to create and write directly to a custom Output Channel but that would require me to create a custom logging class that just replicates something that has been done before.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source