mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 01:29:04 +01:00
cli: initial wsl control server
Adds an stdin/out json rpc server for wsl. Exposes a singular install_local command to install+boot the vscode server on a port from a local archive. Also refines the common rpc layer some more. I'm decently happy with it now.
This commit is contained in:
@@ -135,6 +135,7 @@ impl Clone for Box<dyn LogSink> {
|
||||
}
|
||||
}
|
||||
|
||||
/// The basic log sink that writes output to stdout, with colors when relevant.
|
||||
#[derive(Clone)]
|
||||
pub struct StdioLogSink {
|
||||
level: Level,
|
||||
@@ -247,6 +248,17 @@ impl Logger {
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a new logger with the sink replace with the given sink.
|
||||
pub fn with_sink<T>(&self, sink: T) -> Logger
|
||||
where
|
||||
T: LogSink + 'static,
|
||||
{
|
||||
Logger {
|
||||
sink: vec![Box::new(sink)],
|
||||
..self.clone()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_download_logger<'a>(&'a self, prefix: &'static str) -> DownloadLogger<'a> {
|
||||
DownloadLogger {
|
||||
prefix,
|
||||
|
||||
Reference in New Issue
Block a user