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

leesf commented on HUDI-233:
----------------------------

[~vinoth], With log4j dependency only,  one solution is to use String.format 
for logging, such as _log.info(String.format("%s is a test", "this"));_ but not 
very convenient.

And after a quick look to spark and hive. Spark has slf4j and log4j 
dependencies in pom.xml([https://github.com/apache/spark/blob/master/pom.xml]), 
and use _Logger LOG = LoggerFactory#getLogger_ for logging. Also hive uses 
slf4j and log4j for logging, they are defined in 
pom.xml([https://github.com/apache/hive/blob/master/pom.xml]). So do we have to 
remove the slf4j dependency?

> Redo log statements using {} variable substitution
> --------------------------------------------------
>
>                 Key: HUDI-233
>                 URL: https://issues.apache.org/jira/browse/HUDI-233
>             Project: Apache Hudi (incubating)
>          Issue Type: Bug
>          Components: newbie, Performance
>    Affects Versions: 0.5.0
>            Reporter: Vinoth Chandar
>            Assignee: leesf
>            Priority: Major
>
> Currently we are not employing variable substitution aggresively in the 
> project.  ala 
> {code:java}
> LogManager.getLogger(SomeName.class.getName()).info("Message: {}, Detail: 
> {}", message, detail);
> {code}
> This can improve performance since the string concatenation is deferrable to 
> when the logging is actually in effect.  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to