You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Sawan.Patwari" <sa...@cognizant.com> on 2018/11/19 13:28:54 UTC

Disabling Logging in POI 3.15

Hi,
I am trying to disable logging that is happening in POI 3.15. Please refer
the attached documents for the steps adopted in order to achieve the same,
especially, the 'Approach-3'. 

Regards,
-Sawan.Patwari POI_Logging_Disable_Issue.docx
<http://apache-poi.1045710.n5.nabble.com/file/t340636/POI_Logging_Disable_Issue.docx>   



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

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


Re: Disabling Logging in POI 3.15

Posted by "Sawan.Patwari" <sa...@cognizant.com>.
Thanks for the info, Nick. 

Regards,
-Sawan.Patwari



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

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


Re: Disabling Logging in POI 3.15

Posted by "Sawan.Patwari" <sa...@cognizant.com>.
Hi Andi,
This was very useful and an elaborative information. Thank you for sharing
this information. So far we haven't faced any issue with the excel
generation, but I will certainly get to know the issue that you are
mentioning. We would certainly think to upgrade the libs. I thank you again
for your attention - it is encouraging. 

Regards,
-Sawan.Patwari 



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

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


Re: Disabling Logging in POI 3.15

Posted by Andreas Beeker <ki...@apache.org>.
On 19.11.18 17:05, Nick Burch wrote:
> On Mon, 19 Nov 2018, Sawan.Patwari wrote:
>> There were around 91 matches to the 'System.out.println' statements in the
>> POI-3.15 source-code
>
> Apache POI 3.15 is now over 2 years old, and several security issues have been fixed in newer versions. What happens when you upgrade?
>
I went over the System.outs again and those occur only (if I haven't missed one) in util code, like listing the records of format XY. I've removed a few commented out areas - but as Nick mentions, it's time to upgrade your libs.
IIRC there is one noteworthy regression, before bug #61798 was fixed, in XSSF the last column had a one-off error corrupting the sheets -> you would need to use POI 4.0.0. Just test your use-cases, if you can stay on 3.17 or use 4.0.0.
Btw. I'm in the progress of providing 4.0.1 soon, so maybe you want to wait for it ...

Andi


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


Re: Disabling Logging in POI 3.15

Posted by Nick Burch <ap...@gagravarr.org>.
On Mon, 19 Nov 2018, Sawan.Patwari wrote:
> There were around 91 matches to the 'System.out.println' statements in the
> POI-3.15 source-code

Apache POI 3.15 is now over 2 years old, and several security issues have 
been fixed in newer versions. What happens when you upgrade?

Nick

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


Re: Disabling Logging in POI 3.15

Posted by "Sawan.Patwari" <sa...@cognizant.com>.
Ok. I ran a search only in POI-3.15 source code. 

Regards,
-Sawan.Patwari



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

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


Re: Disabling Logging in POI 3.15

Posted by Aram Mirzadeh <aw...@mbcli.com>.
I'm sure there a few instances, but your search is bit inaccurate.  It
includes test and dev classes, scratchpad, etc...  if you exclude those I
wonder how many system.foo.print we have.

On Mon, Nov 19, 2018 at 10:07 AM Sawan.Patwari <sa...@cognizant.com>
wrote:

> Hi Andi,
> There were around 91 matches to the 'System.out.println' statements in the
> POI-3.15 source-code; please refer the attached screenshot. It would be
> great if we could get rid of these statements from the source-code because
> these statements would certainly bring-down the performance of excel
> generation in the production. Likewise, we might want to have a check in
> the
> other projects show in the attached screenshot. Appreciate your attention
> on
> this thread. Have a good time!
>
>
> Regards,
> -Sawan.Patwari
> <http://apache-poi.1045710.n5.nabble.com/file/t340636/POI-Related-3.jpg>
>
>
>
> --
> Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Re: Disabling Logging in POI 3.15

Posted by "Sawan.Patwari" <sa...@cognizant.com>.
Hi Andi,
There were around 91 matches to the 'System.out.println' statements in the
POI-3.15 source-code; please refer the attached screenshot. It would be
great if we could get rid of these statements from the source-code because
these statements would certainly bring-down the performance of excel
generation in the production. Likewise, we might want to have a check in the
other projects show in the attached screenshot. Appreciate your attention on
this thread. Have a good time! 


Regards,
-Sawan.Patwari
<http://apache-poi.1045710.n5.nabble.com/file/t340636/POI-Related-3.jpg> 



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

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


Re: Disabling Logging in POI 3.15

Posted by "Sawan.Patwari" <sa...@cognizant.com>.
Hi Andi,
We need to remove the 'System.out.println' statements from the code that
which we had missed-out. Please find the attached screenshot for the
information; the file is - 'org.apache.poi.ss.util.CellUtil'. The logging
wasn't enabled in the very first place. Now, we are good. Thank you for your
attention and the time. 

Regards,
-Sawan.Patwari
<http://apache-poi.1045710.n5.nabble.com/file/t340636/POI-Related-2.jpg> 



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

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


Re: Disabling Logging in POI 3.15

Posted by kiwiwings <ki...@apache.org>.
I would try to provide my own PrintStream [1], set System.out and trace/debug
its caller.


[1]
https://stackoverflow.com/questions/2227095/how-to-override-not-the-oop-override-the-output-of-system-out-print



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

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


Re: Disabling Logging in POI 3.15

Posted by "Sawan.Patwari" <sa...@cognizant.com>.
Hi Andi,
Even I tried to do a search on the below string combinations, but didn't
find a match. 

1. BorderStyle short usage
2. short usage
3. usage

Below is the code where 'BorderStyle' entity is being used. And, 'CellStyle'
is an Interface. Perhaps, an implementation class is logging this one. I
might probably have to figure-out which is that class that is being
referenced at runtime. 
CellStyle style = workbook.createCellStyle();
style.setBorderRight(BorderStyle.THIN);

I am attaching a screenshot for your reference; can you help me in figuring
out the implementation class of CellStyle that might be referenced at
runtime (by looking at the jars that are used - as shown in the attached
screenshot). It must be 'XSSFCellStyle' class, since the workbook is created
using - 'XSSFWorkbook'. But, in the source code of 'XSSFCellStyle' class, I
didn't find the above mentioned string combinations. I will also try to
figure out in the mean time. Thanks for your help in advance. 
<http://apache-poi.1045710.n5.nabble.com/file/t340636/POI-Related-1.jpg> 

Regards,
-Sawan.Patwari




--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

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


Re: Disabling Logging in POI 3.15

Posted by Andreas Beeker <ki...@apache.org>.
Hi,

I've searched the codebase for ->usage"<- (and other variations) to check if we generate such a string somewhere,
but didn't find anything - please check your other libs/code.

Andi

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