[
https://issues.apache.org/jira/browse/HIVE-20849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16760938#comment-16760938
]
BELUGA BEHR commented on HIVE-20849:
------------------------------------
[~ngangam]
Hive uses SLF4J. One of its features is the concept of parameterized logging.
You pass a log message String with markers "{}" and the value that will
populate that marker.
{code:java}
// personObject.toString() is called within the debug method, only if DEBUG
level is enabled
LOG.debug("Hello, my name is {}", personObject);
{code}
Less code, cleaner code, faster code when debugging is not enabled.
[https://www.slf4j.org/faq.html#logging_performance]
For something like WARN/ERROR, there's really no need to wrap it or do anything
special. There is very rarely a case where WARN and ERROR logging is not
enabled, and we should not be optimizing for a scenario where it is disabled.
> Review of ConstantPropagateProcFactory
> --------------------------------------
>
> Key: HIVE-20849
> URL: https://issues.apache.org/jira/browse/HIVE-20849
> Project: Hive
> Issue Type: Improvement
> Components: Logical Optimizer
> Affects Versions: 3.1.0, 4.0.0
> Reporter: BELUGA BEHR
> Assignee: BELUGA BEHR
> Priority: Minor
> Attachments: HIVE-20849.1.patch, HIVE-20849.1.patch,
> HIVE-20849.2.patch, HIVE-20849.3.patch, HIVE-20849.4.patch,
> HIVE-20849.5.patch, HIVE-20849.6.patch
>
>
> I was looking at this class because it blasts a lot of useless (to an admin)
> information to the logs. Especially if the table has a lot of columns, I see
> big blocks of logging that are meaningless to me. I request that the logging
> is toned down to debug, and some other improvements to the code.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)