Skip to content
Browse files

NullTraceReceiver

  • Loading branch information...
1 parent 53f3790 commit 1ad4fdad1d056dbdc844f1c5e2ff575a86bff1c9 @mariusae mariusae committed Feb 18, 2011
Showing with 8 additions and 1 deletion.
  1. +8 −1 finagle-core/src/main/scala/com/twitter/finagle/tracing/TraceReceiver.scala
View
9 finagle-core/src/main/scala/com/twitter/finagle/tracing/TraceReceiver.scala
@@ -13,8 +13,15 @@ trait TraceReceiver {
def receiveSpan(span: Span): Unit
}
+class NullTraceReceiver extends TraceReceiver {
+ def receiveSpan(span: Span) {/*ignore*/}
+}
+
+/**
+ * Pretty-print the span together with the transcript on the console.
+ */
class ConsoleTraceReceiver extends TraceReceiver {
def receiveSpan(span: Span) {
- println(span)
+ span.print()
}
}

0 comments on commit 1ad4fda

Please sign in to comment.
Something went wrong with that request. Please try again.