Thanks for the heads up.

On Fri, May 30, 2008 at 9:40 AM, Jason Dillon <[EMAIL PROTECTED]> wrote:

> There is not string concatenation going on here, so this call
>     if (log.isDebugEnabled()) {
>          log.debug("caught ", e);
>     }
>
> Actually wastes a call to log.isDebugEnabled() as log.debug() will invoke
> this method prior to processing the log message anyways.  You only need to
> guard log messages which contain string concatenation.
>
> --jason
>
>
> On May 30, 2008, at 8:30 PM, Jason Warner wrote:
>
> How so?
>
> On Fri, May 30, 2008 at 12:22 AM, Jason Dillon <[EMAIL PROTECTED]> wrote:
>
>> Its unnecessary to guard these log statements.
>>
>> --jason
>>
>>
>>
>> On May 29, 2008, at 9:59 PM, [EMAIL PROTECTED] wrote:
>>
>>  Author: jawarner
>>> Date: Thu May 29 07:59:43 2008
>>> New Revision: 661343
>>>
>>> URL: http://svn.apache.org/viewvc?rev=661343&view=rev
>>> Log:
>>> GERONIMO-4087: Improve usability of gshell commands deploy/* when failing
>>> to connect to server
>>>
>>> Modified:
>>>
>>> geronimo/server/branches/2.1/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
>>>
>>> Modified:
>>> geronimo/server/branches/2.1/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
>>> URL:
>>> http://svn.apache.org/viewvc/geronimo/server/branches/2.1/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java?rev=661343&r1=661342&r2=661343&view=diff
>>>
>>> ==============================================================================
>>> ---
>>> geronimo/server/branches/2.1/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
>>> (original)
>>> +++
>>> geronimo/server/branches/2.1/framework/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
>>> Thu May 29 07:59:43 2008
>>> @@ -178,10 +178,14 @@
>>>            }
>>>            return manager;
>>>        } catch (IOException e) {
>>> -            log.fatal("caught ", e);
>>> +               if (log.isDebugEnabled()) {
>>> +                log.debug("caught ", e);
>>> +               }
>>>            DeploymentManagerCreationException
>>> deploymentManagerCreationException =
>>>                    (DeploymentManagerCreationException) new
>>> DeploymentManagerCreationException(e.getMessage()).initCause(e);
>>> -            log.fatal("throwing ", deploymentManagerCreationException);
>>> +            if (log.isDebugEnabled()) {
>>> +                log.debug("throwing ",
>>> deploymentManagerCreationException);
>>> +            }
>>>            throw deploymentManagerCreationException;
>>>        } catch (SecurityException e) {
>>>            if (log.isDebugEnabled()) {
>>>
>>>
>>>
>>
>
>
> --
> ~Jason Warner
>
>
>


-- 
~Jason Warner

Reply via email to