[
https://issues.apache.org/jira/browse/SAMZA-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14097397#comment-14097397
]
Yan Fang commented on SAMZA-361:
--------------------------------
Let me put it this way:
1. do we want to put taskName information into the log currently?
For SAMZA-310, containerId seems sufficient to be used as the key. Then we
only need to call MDC.put at the beginning of the container and call MDC.clear
in the end of the container. So putting the logic of
{code}
def info() {
if (!taskName.empty) {
MDC.put(MDC_TASK_NAME, taskName)
}
info("some task log line")
if (!taskName.empty) {
MDC.put(MDC_TASK_NAME, emptyTaskName)
}
}
{code}
into the logging class looks a little overkill for me. Maybe other use cases?
2. if yes for Q1, letting logging class to handle the MDC toggling shown in
above code will be imcompatiable to Grizzled Logging API and maybe influence
the performance (need to be tested).
So my gut feeling is that, let's leave the toggling MDC logic out of the
logging class so far and only provide the MDC API from our logging class. Then
we can complete SAMZA-310. When we have the use case that needs taskName
attached with the log, then we look further into the toggling MDC from logging
class?
Thank you.
> 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)