Skip to content

Commit 0b8c4c4

Browse files
committed
[Feature/betterlogs] Improved logs a lot
1 parent beb3d1b commit 0b8c4c4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

JShellAPI/src/main/java/org/togetherjava/jshellapi/service/JShellService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public JShellService(DockerService dockerService, JShellSessionService sessionSe
5555
writer.write(sanitize(startupScript));
5656
writer.newLine();
5757
} catch (IOException | InterruptedException e) {
58+
LOGGER.warn("Unexpected error during creation.", e);
5859
throw new DockerException(e);
5960
}
6061
this.doingOperation = false;
@@ -84,6 +85,7 @@ public Optional<JShellResult> eval(String code) throws DockerException {
8485

8586
return Optional.of(readResult());
8687
} catch (DockerException | IOException | NumberFormatException ex) {
88+
LOGGER.warn("Unexpected error.", ex);
8789
close();
8890
throw new DockerException(ex);
8991
} finally {
@@ -151,6 +153,7 @@ public Optional<List<String>> snippets() throws DockerException {
151153
}
152154
return Optional.of(snippets);
153155
} catch (IOException ex) {
156+
LOGGER.warn("Unexpected error.", ex);
154157
close();
155158
throw new DockerException(ex);
156159
} finally {
@@ -236,6 +239,7 @@ private void checkContainerOK() throws DockerException {
236239
}
237240
}
238241
} catch (IOException ex) {
242+
LOGGER.warn("Unexpected error.", ex);
239243
throw new DockerException(ex);
240244
}
241245
}

JShellAPI/src/main/resources/application.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ jshellapi.dockerConnectionTimeout=60
2323
server.error.include-message=always
2424

2525
# Spring
26-
# TODO change the following to DEBUG later
27-
logging.level.org.springframework.web=INFO
26+
logging.level.org.springframework.web=DEBUG

0 commit comments

Comments
 (0)