[
https://issues.apache.org/jira/browse/HADOOP-12350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14746078#comment-14746078
]
Chris Nauroth commented on HADOOP-12350:
----------------------------------------
Hi [~dchickabasapa]. Regarding changes like this:
{code}
- if (LOG.isDebugEnabled()) {
- LOG.debug("Found " + key
+ LOG.debug("Found " + key
+ " as an explicit blob. Checking if it's a file or folder.");
- }
{code}
Instead, the idiomatic way to do this with slf4j is:
{code}
LOG.debug("Found {} as an explicit blob. Checking if it's a file or
folder.", key);
{code}
The "{}" is a placeholder in slf4j syntax, The logging methods ({{info}},
{{debug}}, etc.) are variadic, so you'd pass exactly one argument for each "{}"
placeholder in the format string. Internally, slf4j only does the placeholder
replacement if the logging level is enabled. This is why we no longer need the
explicit checks for {{isDebugEnabled()}}, but we do need to make sure we're
using slf4j as I described to avoid unnecessary string concatenation cost.
If this is unclear, I recommend reviewing a few of the recent slf4j migration
patches that have already gone into the codebase.
> WASB Logging: Improve WASB Logging around deletes, reads and writes
> -------------------------------------------------------------------
>
> Key: HADOOP-12350
> URL: https://issues.apache.org/jira/browse/HADOOP-12350
> Project: Hadoop Common
> Issue Type: Improvement
> Components: tools
> Reporter: Dushyanth
> Assignee: Dushyanth
> Fix For: 2.8.0
>
> Attachments: 0001-HADOOP-12350-Added-WASB-Logging-Statement.patch,
> 0001-HADOOP-12350-Moving-from-commons.logging-to-slf4j-lo.patch
>
>
> Logging around the WASB component is very limited and it is disabled by
> default. This improvement is created to add logging around Reads, Writes and
> Deletes when Azure Storage Exception to capture the blobs that hit the
> exception. This information is useful while communicating with the Azure
> storage team for debugging purposes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)