aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/events
diff options
context:
space:
mode:
authorGravatar vladmos <vladmos@google.com>2017-08-10 20:30:17 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-08-11 12:56:15 +0200
commita664a5118e552504ba7962e1cccfea43b51ef28e (patch)
tree0f0926df29537fc48208721818a24bc2817e1ee3 /src/main/java/com/google/devtools/build/lib/events
parent4435515d156dbb0cc40869de686d326b175f61b8 (diff)
Make the print function output debug messages
RELNOTES: The `print` function now prints debug messages instead of warnings. PiperOrigin-RevId: 164880003
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/events')
-rw-r--r--src/main/java/com/google/devtools/build/lib/events/Event.java31
-rw-r--r--src/main/java/com/google/devtools/build/lib/events/EventKind.java9
2 files changed, 31 insertions, 9 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/events/Event.java b/src/main/java/com/google/devtools/build/lib/events/Event.java
index e5fb781b22..e0bf233b65 100644
--- a/src/main/java/com/google/devtools/build/lib/events/Event.java
+++ b/src/main/java/com/google/devtools/build/lib/events/Event.java
@@ -156,17 +156,17 @@ public final class Event implements Serializable {
}
/**
- * Reports a warning.
+ * Reports an error.
*/
- public static Event warn(@Nullable Location location, String message) {
- return new Event(EventKind.WARNING, location, message, null);
+ public static Event error(@Nullable Location location, String message){
+ return new Event(EventKind.ERROR, location, message, null);
}
/**
- * Reports an error.
+ * Reports a warning.
*/
- public static Event error(@Nullable Location location, String message){
- return new Event(EventKind.ERROR, location, message, null);
+ public static Event warn(@Nullable Location location, String message) {
+ return new Event(EventKind.WARNING, location, message, null);
}
/**
@@ -184,10 +184,10 @@ public final class Event implements Serializable {
}
/**
- * Reports a warning.
+ * Reports a debug message.
*/
- public static Event warn(String message) {
- return warn(null, message);
+ public static Event debug(@Nullable Location location, String message) {
+ return new Event(EventKind.DEBUG, location, message, null);
}
/**
@@ -198,6 +198,13 @@ public final class Event implements Serializable {
}
/**
+ * Reports a warning.
+ */
+ public static Event warn(String message) {
+ return warn(null, message);
+ }
+
+ /**
* Reports atemporal statements about the build, i.e. they're true for the duration of execution.
*/
public static Event info(String message) {
@@ -211,4 +218,10 @@ public final class Event implements Serializable {
return progress(null, message);
}
+ /**
+ * Reports a debug message.
+ */
+ public static Event debug(String message) {
+ return debug(null, message);
+ }
}
diff --git a/src/main/java/com/google/devtools/build/lib/events/EventKind.java b/src/main/java/com/google/devtools/build/lib/events/EventKind.java
index 0146fda747..087de602d6 100644
--- a/src/main/java/com/google/devtools/build/lib/events/EventKind.java
+++ b/src/main/java/com/google/devtools/build/lib/events/EventKind.java
@@ -52,6 +52,11 @@ public enum EventKind {
PROGRESS,
/**
+ * For debug messages
+ */
+ DEBUG,
+
+ /**
* For progress messages (temporal information) relating to the start
* and end of particular tasks.
* (e.g. "Loading package foo", "Compiling bar", etc.)
@@ -102,6 +107,7 @@ public enum EventKind {
public static final Set<EventKind> ERRORS_AND_WARNINGS = EnumSet.of(
EventKind.ERROR,
EventKind.WARNING,
+ EventKind.DEBUG,
EventKind.FAIL,
EventKind.TIMEOUT
);
@@ -109,6 +115,7 @@ public enum EventKind {
public static final Set<EventKind> ERRORS_WARNINGS_AND_INFO = EnumSet.of(
EventKind.ERROR,
EventKind.WARNING,
+ EventKind.DEBUG,
EventKind.PASS,
EventKind.FAIL,
EventKind.TIMEOUT,
@@ -126,6 +133,7 @@ public enum EventKind {
public static final Set<EventKind> ERRORS_AND_WARNINGS_AND_OUTPUT = EnumSet.of(
EventKind.ERROR,
EventKind.WARNING,
+ EventKind.DEBUG,
EventKind.FAIL,
EventKind.TIMEOUT,
EventKind.STDOUT,
@@ -135,6 +143,7 @@ public enum EventKind {
public static final Set<EventKind> ERRORS_WARNINGS_AND_INFO_AND_OUTPUT = EnumSet.of(
EventKind.ERROR,
EventKind.WARNING,
+ EventKind.DEBUG,
EventKind.PASS,
EventKind.FAIL,
EventKind.TIMEOUT,