Skip to content

Commit

Permalink
Yet once revisiteed the logging of the plugin
Browse files Browse the repository at this point in the history
- inplace should not confuse user by the temporary files

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
  • Loading branch information
dmatej committed May 3, 2023
1 parent ccf3a5e commit 2a14f33
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public String nativeToAscii(final String string) {
* @throws IOException
*/
public void nativeToAscii(final File src, final File dst, final String encoding) throws IOException {
this.log.info("Converting '" + src + "' to '" + dst + "'");
this.log.debug("Processing '" + src + "' to '" + dst + "'");
if (!dst.getParentFile().exists()) {
dst.getParentFile().mkdirs();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void executeTransformation(final Iterator<File> files) throws MojoExecuti
Path tmpDir = createTmpDir();
while (files.hasNext()) {
File file = files.next();
getLog().debug("Processing " + file);
getLog().info("Converting " + file);
try {
File tempFile = Files.createTempFile(tmpDir, file.getName(), "native2ascii").toFile();
new Native2Ascii(getLog()).nativeToAscii(file, tempFile, encoding);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ public void executeTransformation(final Iterator<File> files) throws MojoExecuti

while (files.hasNext()) {
final File file = files.next();
getLog().debug("Processing " + file);
try {
new Native2Ascii(getLog()).nativeToAscii(file, getTargetFile(file), encoding);
File targetFile = getTargetFile(file);
getLog().info("Converting '" + file + "' to '" + targetFile + "'");
new Native2Ascii(getLog()).nativeToAscii(file, targetFile, encoding);
} catch (final IOException e) {
throw new MojoExecutionException("Unable to convert " + file.getAbsolutePath(), e);
}
Expand Down

0 comments on commit 2a14f33

Please sign in to comment.