use of com.intellij.remoteServer.agent.util.log.LogListener in project intellij-community by JetBrains.
the class CloudLoggingHandlerImpl method getOrCreateLogListener.
@Override
public LogListener getOrCreateLogListener(String pipeName) {
LogListener logListener = myPipeName2LogListener.get(pipeName);
if (logListener == null) {
final LoggingHandler loggingHandler = myLogManager.addAdditionalLog(pipeName);
logListener = new LogListenerImpl(loggingHandler);
myPipeName2LogListener.put(pipeName, logListener);
}
return logListener;
}
use of com.intellij.remoteServer.agent.util.log.LogListener in project intellij-community by JetBrains.
the class CloudLoggingHandlerImpl method createConsole.
@Override
public LogListener createConsole(String pipeName, final OutputStream consoleInput) {
final LoggingHandler loggingHandler = myLogManager.addAdditionalLog(pipeName);
loggingHandler.attachToProcess(new ProcessHandler() {
@Override
protected void destroyProcessImpl() {
}
@Override
protected void detachProcessImpl() {
}
@Override
public boolean detachIsDefault() {
return false;
}
@Nullable
@Override
public OutputStream getProcessInput() {
return consoleInput;
}
});
return new LogListener() {
@Override
public void lineLogged(String line) {
loggingHandler.print(line);
}
};
}
Aggregations