[ https://issues.apache.org/jira/browse/HDFS-9118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15208612#comment-15208612 ]
James Clampffer commented on HDFS-9118: --------------------------------------- bq. Before we commit it, do you think we should add a _FILE_ and _LINE_ capture to the macro? I can imagine the additional default context could be handy, and it is very cheap at runtime. Sure; I'll capture it but won't print it by default in the StderrLogger to keep things a bit easier to read when skimming through. bq. We might also be able to use SFINAE (https://en.wikipedia.org/wiki/Substitution_failure_is_not_an_error) to detect if "this" is valid in the current context and capture this as a void pointer (which has been Very Helpful in recent debugging, especially for lifetime issues). I'd like to hold off on SFINAE simply because I'm not too experienced with it and I don't want to turn this into a playground for learning template magic. This patch is picking up on 'this' for the block reader using the FMT_THIS_AND<stuff> macros but I can also add it to the RPC code where applicable. > Add logging system for libdhfs++ > -------------------------------- > > Key: HDFS-9118 > URL: https://issues.apache.org/jira/browse/HDFS-9118 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: hdfs-client > Affects Versions: HDFS-8707 > Reporter: Bob Hansen > Assignee: James Clampffer > Attachments: HDFS-9118.HDFS-8707.000.patch, > HDFS-9118.HDFS-8707.001.patch, HDFS-9118.HDFS-8707.002.patch, > HDFS-9118.HDFS-8707.003.patch, HDFS-9118.HDFS-8707.003.patch > > > With HDFS-9505, we've starting logging data from libhdfs++. Consumers of the > library are going to have their own logging infrastructure that we're going > to want to provide data to. > libhdfs++ should have a logging library that: > * Is overridable and can provide sufficient information to work well with > common C++ logging frameworks > * Has a rational default implementation > * Is performant -- This message was sent by Atlassian JIRA (v6.3.4#6332)