Skip to content
Snippets Groups Projects
Commit 124974be authored by Giorgi Fafakerashvili's avatar Giorgi Fafakerashvili
Browse files

Some changes in log printing

parent 87e84b90
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ object Main {
var counter: Int = 0
for(_ <- 1 until 100) {
for(_ <- 1 until 10000) {
producer.send(producerRecord, myCallback)
println(counter)
counter = counter + 1
......
......@@ -900,16 +900,10 @@ private[kafka] class Processor(val id: Int,
val req = new RequestChannel.Request(processor = id, context = context,
startTimeNanos = nowNanos, memoryPool, receive.payload, requestChannel.metrics)
// XTrace.startTask(true)
Baggage.start(header.baggage)
xtrace.log("Adding requst to request channel")
println("SocketServer wrapping up request")
if(header.baggage.length > 0) {
println("header has baggage: " + header.baggage)
}
xtrace.log("Adding request to request channel")
// Create Baggage
val detachedBaggage: DetachedBaggage = Baggage.fork()
......
......@@ -57,12 +57,12 @@ trait Logging {
def trace(msg: => String): Unit = {
logger.trace(msgWithLogIdent(msg))
xtrace.log("trace---\t" + msg)
xtrace.log(msg)
}
def trace(msg: => String, e: => Throwable): Unit = {
logger.trace(msgWithLogIdent(msg),e)
xtrace.log("trace---\t" + msg)
xtrace.log(msg)
}
def isDebugEnabled: Boolean = logger.underlying.isDebugEnabled
......@@ -71,7 +71,7 @@ trait Logging {
def debug(msg: => String): Unit = {
logger.debug(msgWithLogIdent(msg))
xtrace.log("debug---\t" + msg)
xtrace.log(msg)
}
def debug(msg: => String, e: => Throwable): Unit = {
......@@ -81,43 +81,43 @@ trait Logging {
def info(msg: => String): Unit = {
logger.info(msgWithLogIdent(msg))
xtrace.log("info---\t" + msg)
xtrace.log(msg)
}
def info(msg: => String,e: => Throwable): Unit = {
logger.info(msgWithLogIdent(msg),e)
xtrace.log("info---\t" + msg)
xtrace.log(msg)
}
def warn(msg: => String): Unit = {
logger.warn(msgWithLogIdent(msg))
xtrace.log("warn---\t" + msg)
xtrace.log(msg)
}
def warn(msg: => String, e: => Throwable): Unit = {
logger.warn(msgWithLogIdent(msg),e)
xtrace.log("warn---\t" + msg)
xtrace.log(msg)
}
def error(msg: => String): Unit = {
logger.error(msgWithLogIdent(msg))
xtrace.log("error---\t" + msg)
xtrace.log(msg)
}
def error(msg: => String, e: => Throwable): Unit = {
logger.error(msgWithLogIdent(msg),e)
xtrace.log("error---\t" + msg)
xtrace.log(msg)
}
def fatal(msg: => String): Unit = {
logger.error(Logging.FatalMarker, msgWithLogIdent(msg))
xtrace.log("fatal---\t" + msg)
xtrace.log(msg)
}
def fatal(msg: => String, e: => Throwable): Unit = {
logger.error(Logging.FatalMarker, msgWithLogIdent(msg), e)
xtrace.log("fatal---\t" + msg)
xtrace.log(msg)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment