aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/sonarsource/scanner/cli/Logs.java2
-rw-r--r--src/test/java/org/sonarsource/scanner/cli/LogsTest.java13
2 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/org/sonarsource/scanner/cli/Logs.java b/src/main/java/org/sonarsource/scanner/cli/Logs.java
index 87794d6..a5cbcc8 100644
--- a/src/main/java/org/sonarsource/scanner/cli/Logs.java
+++ b/src/main/java/org/sonarsource/scanner/cli/Logs.java
@@ -56,7 +56,7 @@ public class Logs {
}
public void warn(String message) {
- print(stdErr, "WARN: " + message);
+ print(stdOut, "WARN: " + message);
}
public void error(String message) {
diff --git a/src/test/java/org/sonarsource/scanner/cli/LogsTest.java b/src/test/java/org/sonarsource/scanner/cli/LogsTest.java
index 385b329..5e1e0e3 100644
--- a/src/test/java/org/sonarsource/scanner/cli/LogsTest.java
+++ b/src/test/java/org/sonarsource/scanner/cli/LogsTest.java
@@ -19,16 +19,15 @@
*/
package org.sonarsource.scanner.cli;
+import java.io.PrintStream;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Matchers;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.sonarsource.scanner.cli.Logs;
-import java.io.PrintStream;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
public class LogsTest {
@Mock
@@ -51,19 +50,19 @@ public class LogsTest {
verify(stdOut).println("INFO: info");
verifyNoMoreInteractions(stdOut, stdErr);
}
-
+
@Test
public void testWarn() {
logs.warn("warn");
- verify(stdErr).println("WARN: warn");
+ verify(stdOut).println("WARN: warn");
verifyNoMoreInteractions(stdOut, stdErr);
}
-
+
@Test
public void testWarnWithTimestamp() {
logs.setDebugEnabled(true);
logs.warn("warn");
- verify(stdErr).println(Matchers.matches("\\d\\d:\\d\\d:\\d\\d.\\d\\d\\d WARN: warn"));
+ verify(stdOut).println(Matchers.matches("\\d\\d:\\d\\d:\\d\\d.\\d\\d\\d WARN: warn"));
verifyNoMoreInteractions(stdOut, stdErr);
}