Skip to content

Commit

Permalink
Reduced logging
Browse files Browse the repository at this point in the history
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
  • Loading branch information
dmatej committed Feb 20, 2024
1 parent e17505f commit 5872a8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ com.sun.enterprise.naming.level=INFO
com.sun.enterprise.resource.level=INFO
com.sun.enterprise.security.level=INFO
com.sun.enterprise.universal.level=INFO
com.sun.enterprise.util.io.level=INFO
com.sun.webui.level=INFO

jakarta.level=INFO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ public static File copyResourceToDirectory(String resourcePath, File outputDirec
* @throws IOException
*/
public static File copyResource(String resourcePath, File outputFile) throws IOException {
LOG.log(Level.INFO, "copyResource(resourcePath={0}, outputFile={1})", resourcePath, outputFile);
LOG.log(DEBUG, "copyResource(resourcePath={0}, outputFile={1})", resourcePath, outputFile);
try (InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(resourcePath)) {
if (is == null) {
return null;
Expand Down Expand Up @@ -721,7 +721,7 @@ public static void copy(File fin, File fout) throws IOException {
throw new RuntimeException("Can't create parent dir of output file: " + fout);
}
Files.copy(fin.toPath(), fout.toPath(), StandardCopyOption.REPLACE_EXISTING);
LOG.log(Level.DEBUG, "Successfully copyied file {0} to {1}", fin, fout);
LOG.log(DEBUG, "Successfully copyied file {0} to {1}", fin, fout);
}


Expand Down Expand Up @@ -827,10 +827,10 @@ public static void copy(InputStream in, File out, long byteCount) throws IOExcep
*/
public static void copy(InputStream in, File out) throws IOException {
if (out.getParentFile().mkdirs()) {
LOG.log(Level.INFO, "Created directory {0}", out.getCanonicalPath());
LOG.log(DEBUG, "Created directory {0}", out.getCanonicalPath());
}
long bytes = Files.copy(in, out.toPath(), StandardCopyOption.REPLACE_EXISTING);
LOG.log(Level.INFO, "Copyied {0} bytes to {1}", bytes, out);
LOG.log(DEBUG, "Copyied {0} bytes to {1}", bytes, out);
}


Expand Down

0 comments on commit 5872a8e

Please sign in to comment.