I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Verified Commit 7249f216 authored by idk's avatar idk
Browse files

redirect output and error from process builder to files within the plugin directory

parent d1192f74
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,8 @@ public class ShellService implements ClientApp {
private final ProcessBuilder _pb;
private final I2PAppContext _context;
private final ClientAppManager _cmgr;
private final File _errorLog;
private final File _outputLog;
private ClientAppState _state = ClientAppState.UNINITIALIZED;
......@@ -84,6 +86,10 @@ public class ShellService implements ClientApp {
_pb = new ProcessBuilder(process);
File pluginDir = new File(_context.getConfigDir(), PLUGIN_DIR + '/' + this.getName());
_errorLog = new File(pluginDir, "error.log");
_outputLog = new File(pluginDir, "output.log");
_pb.redirectOutput(_outputLog);
_pb.redirectError(_errorLog);
_pb.directory(pluginDir);
changeState(ClientAppState.INITIALIZED, "ShellService: " + getName() + " set up and initialized");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment