You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2012/02/09 13:02:20 UTC

DO NOT REPLY [Bug 52628] New: Replace System.err calls with Logger call

https://issues.apache.org/bugzilla/show_bug.cgi?id=52628

             Bug #: 52628
           Summary: Replace System.err calls with Logger call
           Product: POI
           Version: 3.8-dev
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POI Overall
        AssignedTo: dev@poi.apache.org
        ReportedBy: tkrah@fachschaft.imn.htwk-leipzig.de
    Classification: Unclassified


This is more a enhancement / feature request - did not found any task yet for
this one, maybe its a duplicate.

There are some System.err calls in the Poi code, e.g. Sheet.java in Scratchpad.
May it be possible that these call are replaced by a call to $logger.error(...)
instead to integrate them in the logging system a user may choose?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 52628] [PATCH] Replace System.err calls with Logger call

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52628

--- Comment #6 from Jeremy <rp...@yahoo.com> ---
Created attachment 29540
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29540&action=edit
Patch against rev 1404603

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 52628] [PATCH] Replace System.err calls with Logger call

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52628

Yegor Kozlov <ye...@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Yegor Kozlov <ye...@dinom.ru> ---
Thanks for the patch, applied in r1410318

Yegor

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52628] Replace System.err calls with Logger call

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52628

--- Comment #2 from Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> 2012-02-09 12:18:51 UTC ---
Yes i can do this patch and submit it.
Is it enough to do this against latest trunk?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52628] Replace System.err calls with Logger call

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52628

--- Comment #4 from Yegor Kozlov <ye...@dinom.ru> 2012-02-10 11:40:11 UTC ---
getLogger(XXX.class) should be fine.

Yegor

(In reply to comment #3)
> Patch question: Would you like to have a logger per name or a logger per class,
> e.g. getLogger("poi-error") and all system.err calls use this one, or should it
> be a getLogger(XXX.class) one?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 52628] [PATCH] Replace System.err calls with Logger call

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52628

Jeremy <rp...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.8-dev                     |3.9-dev
            Summary|Replace System.err calls    |[PATCH] Replace System.err
                   |with Logger call            |calls with Logger call

--- Comment #5 from Jeremy <rp...@yahoo.com> ---
A patch file has been supplied for fixing this issue by replacing most
instances of System.err with a POILogFactory.getLogger() logger.

SerialVersionUID's and proper Argument types were applied to lists.

The most complex changes were applied to the HPSFRuntimeException() class where
the print stack trace logic was removed where System.err was being explicitly
declared.   By commenting this out, the base RuntimeException printStackTrace
logic should prevail.

The soon to be added patch file was applied to the current POI daily trunk
3.9-beta1 on November 1st, 2012. Revision (1404603)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52628] Replace System.err calls with Logger call

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52628

--- Comment #3 from Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> 2012-02-09 13:42:18 UTC ---
Patch question: Would you like to have a logger per name or a logger per class,
e.g. getLogger("poi-error") and all system.err calls use this one, or should it
be a getLogger(XXX.class) one?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 52628] [PATCH] Replace System.err calls with Logger call

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52628

Jeremy <rp...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rpi_alum@yahoo.com

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 52628] [PATCH] Replace System.err calls with Logger call

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52628

Jeremy <rp...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29540|0                           |1
        is obsolete|                            |

--- Comment #8 from Jeremy <rp...@yahoo.com> ---
Created attachment 29561
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29561&action=edit
Patch against rev 1406238

Replace System.err info messages with a POILogger.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 52628] [PATCH] Replace System.err calls with Logger call

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52628

--- Comment #7 from Jeremy <rp...@yahoo.com> ---
For some reason scracthpad was not imported into eclipse when I imported from
the ant build file.  I ended up missing the System.err calls from that project.
 A newer more complete patch file is being attached shortly that uses loggers
for scratchpad related code as well.  This will replace the prior patch file.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 52628] Replace System.err calls with Logger call

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52628

--- Comment #1 from Nick Burch <ni...@alfresco.com> 2012-02-09 12:04:32 UTC ---
Would it be possible for you to work up a patch to do this change?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org