Skip to content

Commit

Permalink
print() for spans.
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusae committed Feb 18, 2011
1 parent 1ad4fda commit 8b2a3c9
Showing 1 changed file with 10 additions and 1 deletion.
Expand Up @@ -55,6 +55,15 @@ case class Span(
Span.timeFormat.format(startTime), Span.timeFormat.format(startTime),
(endTime - startTime).inMilliseconds) (endTime - startTime).inMilliseconds)
} }

def print() {
transcript foreach { record =>
val atMs = (record.timestamp - startTime).inMilliseconds
record.message.split("\n") foreach { line =>
println("%s %03dms: %s".format(traceID, atMs, line))
}
}
}
} }


object Trace { object Trace {
Expand All @@ -80,7 +89,7 @@ object Trace {
def clear() { def clear() {
current.clear() current.clear()
} }

def startSpan() { def startSpan() {
this() = newSpan() this() = newSpan()
} }
Expand Down

0 comments on commit 8b2a3c9

Please sign in to comment.