@@ -132,7 +132,6 @@ public synchronized void start(Version version) {
132
132
copyExtraConfigFiles ();
133
133
}
134
134
135
- deleteGcLogs ();
136
135
writeConfiguration ();
137
136
createKeystore ();
138
137
addKeystoreSettings ();
@@ -215,20 +214,6 @@ public void waitUntilReady() {
215
214
}
216
215
}
217
216
218
- private void deleteGcLogs () {
219
- try (Stream <Path > logs = Files .list (logsDir )) {
220
- logs .filter (l -> l .getFileName ().toString ().startsWith ("gc.log" )).forEach (path -> {
221
- try {
222
- IOUtils .deleteWithRetry (path );
223
- } catch (IOException e ) {
224
- throw new UncheckedIOException (e );
225
- }
226
- });
227
- } catch (IOException e ) {
228
- throw new UncheckedIOException (e );
229
- }
230
- }
231
-
232
217
private void createConfigDirectory () {
233
218
try {
234
219
IOUtils .deleteWithRetry (configDir );
@@ -615,14 +600,13 @@ private Map<String, String> getEnvironmentVariables() {
615
600
}
616
601
617
602
private Map <String , String > getJvmOptionsReplacements () {
618
- Path relativeLogsDir = workingDir .relativize (logsDir );
619
603
return Map .of (
620
604
"-XX:HeapDumpPath=data" ,
621
- "-XX:HeapDumpPath=" + relativeLogsDir ,
605
+ "-XX:HeapDumpPath=" + logsDir ,
622
606
"logs/gc.log" ,
623
- relativeLogsDir .resolve ("gc.log" ).toString (),
607
+ logsDir .resolve ("gc.log" ).toString (),
624
608
"-XX:ErrorFile=logs/hs_err_pid%p.log" ,
625
- "-XX:ErrorFile=" + relativeLogsDir .resolve ("hs_err_pid%p.log" )
609
+ "-XX:ErrorFile=" + logsDir .resolve ("hs_err_pid%p.log" )
626
610
);
627
611
}
628
612
0 commit comments