Author: tchemit Date: 2010-04-12 13:15:15 +0200 (Mon, 12 Apr 2010) New Revision: 1739 Log: improve log Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateFileHeaderMojo.java Modified: trunk/src/main/java/org/nuiton/license/plugin/UpdateFileHeaderMojo.java =================================================================== --- trunk/src/main/java/org/nuiton/license/plugin/UpdateFileHeaderMojo.java 2010-04-12 11:02:13 UTC (rev 1738) +++ trunk/src/main/java/org/nuiton/license/plugin/UpdateFileHeaderMojo.java 2010-04-12 11:15:15 UTC (rev 1739) @@ -309,8 +309,8 @@ String licenseName = header.getLicenseName(); License license = getLicense(licenseName); - getLog().info("process header '" + header.getCommentStyle() + "'"); - getLog().info("using " + license.getDescription()); + getLog().info("Process header '" + header.getCommentStyle() + "'"); + getLog().info(" - using " + license.getDescription()); // use header transformer according to comment style given in header setTransformer(getTransformer(header.getCommentStyle())); @@ -335,8 +335,8 @@ File basedir = new File(getProject().getBasedir(), fileSet.getBasedir()); - if (isVerbose()) { - getLog().info("process file set with basedir : " + basedir); + if (getLog().isDebugEnabled()) { + getLog().debug(" - process file set with basedir : " + basedir); } List<String> includes = fileSet.getIncludes(); @@ -375,11 +375,11 @@ protected void processFileEntry(File entryBasedir, String[] paths) throws IOException { - getLog().info(paths.length + " file(s) to treate in " + entryBasedir); + getLog().info(" - " + paths.length + " file(s) to treate in " + entryBasedir); for (String path : paths) { File file = new File(entryBasedir, path); if (getProcessedFiles().contains(file)) { - getLog().info("skip already processed file " + file); + getLog().info(" - skip already processed file " + file); continue; } @@ -426,10 +426,10 @@ protected boolean processFile(File file, File processFile) throws IOException { - getLog().debug("will process into file " + processFile); - if (isVerbose()) { - getLog().info("process file " + file); + if (getLog().isDebugEnabled()) { + getLog().debug(" - process file " + file); + getLog().debug(" - will process into file " + processFile); } String content; @@ -449,7 +449,7 @@ //check that file is not marked to be ignored if (content.contains(getIgnoreTag())) { getLog().info( - "ignore file (detected " + getIgnoreTag() + ") " + file); + " - ignore file (detected " + getIgnoreTag() + ") " + file); FileState.ignore.addFile(file, getResult()); @@ -477,7 +477,7 @@ if (processor.isTouched()) { if (isVerbose()) { - getLog().info("header was updated for " + file); + getLog().info(" - header was updated for " + file); } if (processor.isModified()) { @@ -505,7 +505,7 @@ // no header at all, add a new header - getLog().info("adding license header on file " + file); + getLog().info(" - adding license header on file " + file); //FIXME-TC-20100409 form xml files must add header after a xml prolog line content = getTransformer().addHeader( @@ -533,7 +533,7 @@ } if (isVerbose()) { - getLog().debug("backup original file " + file); + getLog().debug(" - backup original file " + file); } renameFile(file, backupFile);