No, I think it is ok to have log.isInfoEnabled() condition. It would allow
users to disable INFO logs and run, in such situations string processing
will not execute.

On Fri, Mar 6, 2015 at 6:20 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Vishanth,
>
> We can remove the check of log.isInfoAvailable() too
> if (log.isInfoEnabled()) {log.info(String.format("Adding autoscaling
> policy: [id] %s", policy.getId()));}
>
> On Fri, Mar 6, 2015 at 6:13 PM, Vishanth Balasubramaniam <
> vishan...@wso2.com> wrote:
>
>> Hi Devs,
>>
>> I was working on throwing an exception in registry manager when
>> persisting autoscaler with an invalid autoscale policy id.
>> ​
>> While testing the scenario, I found out that the autoscaler policy is
>> added to the information model in policy manager, even if persisting
>> autoscaler policy is unsuccessful.
>>
>> Changes were made in the Pull Request #261 [1]. Please review and merge.
>>
>> [1] -  https://github.com/apache/stratos/pull/261
>>
>> Thank you,
>> Vishanth
>>
>> --
>> *Vishanth Balasubramaniam*
>> Software Engineer
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94771737718*
>> about me: *http://about.me/vishanth <http://about.me/vishanth>*
>>
>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Reply via email to