Skip to content

Commit b008e4c

Browse files
authored
Reduce amount of log junk emitted (#1286)
* Reduce amount of log junk we emit
1 parent b31c289 commit b008e4c

File tree

12 files changed

+22
-22
lines changed

12 files changed

+22
-22
lines changed

maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AbstractScmMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public void execute() throws MojoExecutionException {
227227
for (Entry<String, String> entry : providerImplementations.entrySet()) {
228228
String providerType = entry.getKey();
229229
String providerImplementation = entry.getValue();
230-
getLog().info("Change the default '" + providerType + "' provider implementation to '"
230+
getLog().debug("Change the default '" + providerType + "' provider implementation to '"
231231
+ providerImplementation + "'.");
232232
getScmManager().setScmProviderImplementation(providerType, providerImplementation);
233233
}

maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/BranchMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void execute() throws MojoExecutionException {
8686
ScmProvider provider = getScmManager().getProviderByRepository(repository);
8787

8888
String finalBranch = provider.sanitizeTagName(branch);
89-
getLog().info("Final Branch Name: '" + finalBranch + "'");
89+
getLog().debug("Final Branch Name: '" + finalBranch + "'");
9090

9191
ScmBranchParameters scmBranchParameters = new ScmBranchParameters(message);
9292
scmBranchParameters.setRemoteBranching(remoteBranching);

maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ChangeLogMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public void execute() throws MojoExecutionException {
201201
ChangeLogSet changeLogSet = result.getChangeLog();
202202

203203
for (ChangeSet changeSet : changeLogSet.getChangeSets()) {
204-
getLog().info(changeSet.toString());
204+
getLog().debug(changeSet.toString());
205205
}
206206

207207
} catch (IOException | ScmException e) {

maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ protected ScmResult checkout() throws MojoExecutionException {
146146

147147
private void prepareOutputDirectory(File ouputDirectory) throws MojoExecutionException {
148148
try {
149-
this.getLog().info("Removing " + ouputDirectory);
149+
this.getLog().debug("Removing " + ouputDirectory);
150150

151151
FileUtils.deleteDirectory(getCheckoutDirectory());
152152
} catch (IOException e) {

maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/DiffMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void execute() throws MojoExecutionException {
9191

9292
checkResult(result);
9393

94-
getLog().info(result.getPatch());
94+
getLog().debug(result.getPatch());
9595

9696
try {
9797
if (outputFile != null) {

maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ExportMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ protected void export() throws MojoExecutionException {
9999

100100
try {
101101
if (this.exportDirectory.exists()) {
102-
this.getLog().info("Removing " + this.exportDirectory);
102+
this.getLog().debug("Removing " + this.exportDirectory);
103103

104104
FileUtils.deleteDirectory(this.exportDirectory);
105105
}

maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/TagMojo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ public void execute() throws MojoExecutionException {
134134

135135
if (addTimestamp) {
136136
try {
137-
getLog().info("Using timestamp pattern '" + timestampFormat + "'");
137+
getLog().debug("Using timestamp pattern '" + timestampFormat + "'");
138138
dateFormat = new SimpleDateFormat(timestampFormat);
139139
tagTimestamp = dateFormat.format(new Date());
140-
getLog().info("Using timestamp '" + tagTimestamp + "'");
140+
getLog().debug("Using timestamp '" + tagTimestamp + "'");
141141
} catch (IllegalArgumentException e) {
142142
String msg = "The timestamp format '" + timestampFormat + "' is invalid.";
143143
throw new MojoExecutionException(msg, e);
@@ -154,7 +154,7 @@ public void execute() throws MojoExecutionException {
154154
ScmProvider provider = getScmManager().getProviderByRepository(repository);
155155

156156
finalTag = provider.sanitizeTagName(finalTag);
157-
getLog().info("Final Tag Name: '" + finalTag + "'");
157+
getLog().debug("Final Tag Name: '" + finalTag + "'");
158158

159159
ScmTagParameters scmTagParameters = new ScmTagParameters(message);
160160
scmTagParameters.setRemoteTagging(remoteTagging);

maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void execute() throws MojoExecutionException {
9090
if (result instanceof UpdateScmResultWithRevision) {
9191
String revision = ((UpdateScmResultWithRevision) result).getRevision();
9292

93-
getLog().info("Storing revision in '" + revisionKey + "' project property.");
93+
getLog().debug("Storing revision in '" + revisionKey + "' project property.");
9494

9595
if (project.getProperties() != null) // Remove the test when we'll use plugin-test-harness 1.0-alpha-2
9696
{

maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/checkout/HgCheckOutCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ protected CheckOutScmResult executeCheckOutCommand(
5555

5656
File checkoutDir = fileSet.getBasedir();
5757
try {
58-
if (logger.isInfoEnabled()) {
59-
logger.info("Removing " + checkoutDir);
58+
if (logger.isDebugEnabled()) {
59+
logger.debug("Removing " + checkoutDir);
6060
}
6161
FileUtils.deleteDirectory(checkoutDir);
6262
} catch (IOException e) {

maven-scm-providers/maven-scm-provider-hg/src/main/java/org/apache/maven/scm/provider/hg/command/status/HgStatusConsumer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ public void doConsume(ScmFileStatus status, String trimmedLine) {
4444
// Only include real files (not directories)
4545
File tmpFile = new File(workingDir, trimmedLine);
4646
if (!tmpFile.exists()) {
47-
if (logger.isInfoEnabled()) {
48-
logger.info("Not a file: " + tmpFile + ". Ignoring");
47+
if (logger.isDebugEnabled()) {
48+
logger.debug("Not a file: " + tmpFile + ". Ignoring");
4949
}
5050
} else if (tmpFile.isDirectory()) {
51-
if (logger.isInfoEnabled()) {
52-
logger.info("New directory added: " + tmpFile);
51+
if (logger.isDebugEnabled()) {
52+
logger.debug("New directory added: " + tmpFile);
5353
}
5454
} else {
5555
ScmFile scmFile = new ScmFile(trimmedLine, status);
56-
if (logger.isInfoEnabled()) {
57-
logger.info(scmFile.toString());
56+
if (logger.isDebugEnabled()) {
57+
logger.debug(scmFile.toString());
5858
}
5959
repositoryStatus.add(scmFile);
6060
}

0 commit comments

Comments
 (0)