[ 
https://issues.apache.org/jira/browse/SAMZA-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14096062#comment-14096062
 ] 

Yan Fang commented on SAMZA-361:
--------------------------------

{quote}
 It almost seems like what we really need is to just set the task name in the 
MDC in the run loop, and then unset it again at the end.
{quote}

Yes, I feel the same way.

{quote}
Another random thought is that I'm not sure if messing with the MDC is 
threadsafe. If we set the MDC task name, and a Kafka consumer thread 
(BrokerProxy.scala) is logging, will it list the task name? That wouldn't make 
sense.
{quote}

>From https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/MDC.html , 
>"The MDC is managed on a per thread basis". So seems that we can think MDC is 
>threadsafe.

> Remove Grizzled SLF4J
> ---------------------
>
>                 Key: SAMZA-361
>                 URL: https://issues.apache.org/jira/browse/SAMZA-361
>             Project: Samza
>          Issue Type: Bug
>          Components: container
>    Affects Versions: 0.8.0
>            Reporter: Chris Riccomini
>             Fix For: 0.8.0
>
>
> The cons of Grizzled SLF4J outweigh the pros. We can [create a single 
> class|https://github.com/apache/kafka/blob/0.8.1/core/src/main/scala/kafka/utils/Logging.scala]
>  that does what we need for logging. Eliminating the Grizzled dependency 
> means that we'll have one less Scala binary to depend on. It will also give 
> us more control over SLF4J APis that we might want to use (e.g. the 
> [MDC|http://www.slf4j.org/api/org/slf4j/MDC.html], see SAMZA-310).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to