use of com.intellij.remoteServer.runtime.log.LoggingHandler in project intellij-community by JetBrains.
the class CloudDeploymentRuntime method deploy.
public void deploy(ServerRuntimeInstance.DeploymentOperationCallback callback) {
try {
CloudRemoteApplication application = deploy();
DeploymentLogManager logManager = getLogManager();
if (logManager != null) {
LoggingHandler loggingHandler = logManager.getMainLoggingHandler();
loggingHandler.print("Application is available at ");
loggingHandler.printHyperlink(application.getWebUrl());
loggingHandler.print("\n");
}
callback.succeeded(this);
} catch (ServerRuntimeException e) {
callback.errorOccurred(e.getMessage());
}
}
use of com.intellij.remoteServer.runtime.log.LoggingHandler 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.runtime.log.LoggingHandler 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