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

lamber-ken commented on HUDI-233:
---------------------------------

Hi, [~xleesf] [~vinoth], I think we can use `maven-shade-plugin` to relocate 
the slf4j and log4j, if so, it will work well with other framework. :D

For example
{code:java}
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>3.2.0</version>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
            <configuration>
                <relocations>

                    <relocation>
                        <pattern>org.apache.log4j</pattern>
                        
<shadedPattern>org.apache.hudi.shade.log.log4j</shadedPattern>
                    </relocation>
                    <relocation>
                        <pattern>org.slf4j</pattern>
                        
<shadedPattern>org.apache.hudi.shade.log.slf4j</shadedPattern>
                    </relocation>
                </relocations>
            </configuration>
        </execution>
    </executions>
</plugin>
{code}

> Redo log statements using SLF4J 
> --------------------------------
>
>                 Key: HUDI-233
>                 URL: https://issues.apache.org/jira/browse/HUDI-233
>             Project: Apache Hudi (incubating)
>          Issue Type: Bug
>          Components: newbie
>    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.4#803005)

Reply via email to