You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Chetan Mehrotra <ch...@gmail.com> on 2015/02/19 06:11:42 UTC
Re: svn commit: r1660682 - in /jackrabbit/oak/trunk/oak-solr-core/src:
main/java/org/apache/jackrabbit/oak/plugins/index/solr/configuration/
main/java/org/apache/jackrabbit/oak/plugins/index/solr/configuration/nodestate/
main/java/org/apache/jackrabbit/oak...
Hi Tommaso,
On Wed, Feb 18, 2015 at 10:42 PM, <to...@apache.org> wrote:
> + } else {
> + if (log.isWarnEnabled()) {
> + log.warn("cannot create Solr query index as SolrServer {}Â is unreachable", solrServer);
> + }
> + }
Minor suggestion - You can avoid doing a log check before doing actual
logging [1] if you use parameterized logging and parameters are direct
argument (i.e. not computed by some method call). That would reduce
the clutter in the code!
Chetan Mehrotra
[1] http://stackoverflow.com/questions/8444266/even-with-slf4j-should-you-guard-your-logging
Re: svn commit: r1660682 - in /jackrabbit/oak/trunk/oak-solr-core/src:
main/java/org/apache/jackrabbit/oak/plugins/index/solr/configuration/
main/java/org/apache/jackrabbit/oak/plugins/index/solr/configuration/nodestate/
main/java/org/apache/jackrabbit/oak...
Posted by Tommaso Teofili <to...@gmail.com>.
thanks guys.
@Chetan right, it's on my todo list to remove such guards soon, as I had
already realized it's not much helpful in most of the cases.
@Julian I'll look for the non ASCII char (no idea how it got into the
commit though...).
Regards,
Tommaso
2015-02-19 11:30 GMT+01:00 Julian Reschke <ju...@gmx.de>:
> On 2015-02-19 06:11, Chetan Mehrotra wrote:
>
>> Hi Tommaso,
>>
>> On Wed, Feb 18, 2015 at 10:42 PM, <to...@apache.org> wrote:
>>
>>> + } else {
>>> + if (log.isWarnEnabled()) {
>>> + log.warn("cannot create Solr query index as
>>> SolrServer {}Â is unreachable", solrServer);
>>> + }
>>> + }
>>>
>>
>> Minor suggestion - You can avoid doing a log check before doing actual
>> logging [1] if you use parameterized logging and parameters are direct
>> argument (i.e. not computed by some method call). That would reduce
>> the clutter in the code!
>>
>> Chetan Mehrotra
>> [1] http://stackoverflow.com/questions/8444266/even-with-
>> slf4j-should-you-guard-your-logging
>>
>
> ...and there seems to be a non-ASCII character in the commit...
>
Re: svn commit: r1660682 - in /jackrabbit/oak/trunk/oak-solr-core/src:
main/java/org/apache/jackrabbit/oak/plugins/index/solr/configuration/ main/java/org/apache/jackrabbit/oak/plugins/index/solr/configuration/nodestate/
main/java/org/apache/jackrabbit/oak...
Posted by Julian Reschke <ju...@gmx.de>.
On 2015-02-19 06:11, Chetan Mehrotra wrote:
> Hi Tommaso,
>
> On Wed, Feb 18, 2015 at 10:42 PM, <to...@apache.org> wrote:
>> + } else {
>> + if (log.isWarnEnabled()) {
>> + log.warn("cannot create Solr query index as SolrServer {}Â is unreachable", solrServer);
>> + }
>> + }
>
> Minor suggestion - You can avoid doing a log check before doing actual
> logging [1] if you use parameterized logging and parameters are direct
> argument (i.e. not computed by some method call). That would reduce
> the clutter in the code!
>
> Chetan Mehrotra
> [1] http://stackoverflow.com/questions/8444266/even-with-slf4j-should-you-guard-your-logging
...and there seems to be a non-ASCII character in the commit...