You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Hannes Erven <ha...@erven.at> on 2009/05/11 23:13:26 UTC

PDFBox.log file: disable or change location?

Hi folks,


PDFBox always creates a PDFBox.log file in the current directory; it
seems that this behaviour can only be altered by changing the source in
LoggingObject (see:
http://mail-archives.apache.org/mod_mbox/incubator-pdfbox-users/200903.mbox/%3Ca372432a0903301722y6f96f6e0pb1e22c398d1a3049@mail.gmail.com%3E
).

I am using PDFBox in an application where users do not have write
permission to a common installation location, so every call to PDFBox
fails because the logfile could not be created/appended to.

Is there some better way to disable or redirect (to a different folder)
the log than to alter the source?
I've tried to use a log4j.properties file, but as I am a log4j newbie I
didn't have success...

Wouldn't it be better if PDFBox did not to require a writeable log file
in the current directory? (But perhaps would continue with a console
logger or something?)


Thanks for any suggestions!


Best regards,

	-hannes

Re: PDFBox.log file: disable or change location?

Posted by Daniel Wilson <wi...@gmail.com>.
There is likely a better way.

Currently, in order to disable it, comment out all the code in the
constructor of LoggingObject.

Daniel Wilson

On Mon, May 11, 2009 at 5:13 PM, Hannes Erven <ha...@erven.at> wrote:

> Hi folks,
>
>
> PDFBox always creates a PDFBox.log file in the current directory; it
> seems that this behaviour can only be altered by changing the source in
> LoggingObject (see:
>
> http://mail-archives.apache.org/mod_mbox/incubator-pdfbox-users/200903.mbox/%3Ca372432a0903301722y6f96f6e0pb1e22c398d1a3049@mail.gmail.com%3E
> ).
>
> I am using PDFBox in an application where users do not have write
> permission to a common installation location, so every call to PDFBox
> fails because the logfile could not be created/appended to.
>
> Is there some better way to disable or redirect (to a different folder)
> the log than to alter the source?
> I've tried to use a log4j.properties file, but as I am a log4j newbie I
> didn't have success...
>
> Wouldn't it be better if PDFBox did not to require a writeable log file
> in the current directory? (But perhaps would continue with a console
> logger or something?)
>
>
> Thanks for any suggestions!
>
>
> Best regards,
>
>        -hannes
>