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

Chris Riccomini commented on SAMZA-361:
---------------------------------------

I think that we want everything inside TaskInstance to use the task log, and 
everything else to use the container log.

One thing to think about is whether it makes sense for logging done inside the 
StreamTask to have the task name set in the MDC. I think it does, but the 
proposal that I posted above doesn't support this, sine it sets the MDC back to 
an empty task name before info() finishes. 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.

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.

> 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