[ 
http://mifosforge.jira.com/browse/MIFOS-3923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61849#action_61849
 ] 

Udai Gupta commented on MIFOS-3923:
-----------------------------------

Another alternate is to use an aspect to force error/warning at System.out or 
System.err calls

{code}
public aspect DontWriteToTheConsole {
    pointcut systemOutAccess() : get(* System.out) || get(* System.err);
    declare error : systemOutAccess()
      : "System.out call found, please use logger instead of console output for 
performance reasons";
}
{code}

We can force the build to show warning or even fail if console call is found.

Eclipse AJDT plugin can be used to see these warning/error in Marker/Problem 
view.

> Remove all System.out (replace by CORRECT logging) - and ensure they don't 
> come back
> ------------------------------------------------------------------------------------
>
>                 Key: MIFOS-3923
>                 URL: http://mifosforge.jira.com/browse/MIFOS-3923
>             Project: mifos
>          Issue Type: Bug
>          Components: Build and Testing
>            Reporter: Michael Vorburger
>            Assignee: mifosdeveloperqueue
>             Fix For: Gazelle Backlog
>
>
> I've found 69x System.out, which I'd argue are bugs and should be removed and 
> replaced by CORRECT logging.  System.out is a performance bottleneck (as it, 
> usually, synchronizes on the console), not relevant in single user tests & 
> dev, but measurable in production / load scenarios.
> In tests they are less of a problem, in src/main they should be absolutely 
> forbidden.
> There are also 12 System.err - I had a quick look through them and they are 
> all in test or helpers (in src/main) which are probably called from tools 
> main() and not running Web app code, so may be fine?
> Ideally this issue should include some action to ensure they don't come 
> back... e.g. make sure your shared FindBugs or Checkstyle config (if you do 
> this?) are configured to flag it up red -  or just fail the build if any are 
> re-introduced, that usually helps ;).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mifosforge.jira.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues

Reply via email to