[
https://issues.apache.org/jira/browse/PDFBOX-3219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr updated PDFBOX-3219:
------------------------------------
Description:
As posted by [~rnibali] to the mailing list:
I recently ran some tests using the preflight core, and wondered about the
following message:
{quote}
java -jar preflight-app/target/preflight-app-2.0.0-SNAPSHOT.jar xml batch
./OpenSource/pdftests/
log4j:WARN No appenders could be found for logger
(org.apache.pdfbox.pdfparser.COSParser).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
{quote}
The online PDFBox FAQ (kind of) told me how to solve this. However, using
the example log4j.xml from PDFBox yields the following:
java -Dlog4j.configuration=file:./preflight/src/test/resources/log4j.xml
-jar preflight-app/target/preflight-app-2.0.0-SNAPSHOT.jar xml batch
./OpenSource/pdftests/
{quote}
log4j:ERROR No appender named \[console] could be found.
log4j:ERROR No appender named \[rolling-file] could be found.
{quote}
My suggestion is to replace it with this for starters:
{code}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="true" xmlns:log4j='
http://jakarta.apache.org/log4j/'>
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss}
%-5p %c{1}:%L - %m%n" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="console" />
</root>
</log4j:configuration>
{code}
Additionally, the FAQ entries should be updated with a correct example
regarding the 'java -jar ..." case.
was:
As posted by [~rnibali] to the mailing list:
I recently ran some tests using the preflight core, and wondered about the
following message:
{quote}
java -jar preflight-app/target/preflight-app-2.0.0-SNAPSHOT.jar xml batch
./OpenSource/pdftests/
log4j:WARN No appenders could be found for logger
(org.apache.pdfbox.pdfparser.COSParser).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
{quote}
The online PDFBox FAQ (kind of) told me how to solve this. However, using
the example log4j.xml from PDFBox yields the following:
java -Dlog4j.configuration=file:./preflight/src/test/resources/log4j.xml
-jar preflight-app/target/preflight-app-2.0.0-SNAPSHOT.jar xml batch
./OpenSource/pdftests/
{quote}
log4j:ERROR No appender named \[console] could be found.
log4j:ERROR No appender named \[rolling-file] could be found.
{quote}
My suggestion is to replace it with this for starters:
{code}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="true" xmlns:log4j='
http://jakarta.apache.org/log4j/'>
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd
HH:mm:ss} %-5p %c{1}:%L - %m%n" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="console" />
</root>
</log4j:configuration>
{code}
Additionally, the FAQ entries should be updated with a correct example
regarding the 'java -jar ..." case.
> Suggestion for log4j.xml example inside preflight source
> --------------------------------------------------------
>
> Key: PDFBOX-3219
> URL: https://issues.apache.org/jira/browse/PDFBOX-3219
> Project: PDFBox
> Issue Type: Bug
> Components: Documentation, Preflight
> Affects Versions: 2.0.0
> Reporter: Tilman Hausherr
> Labels: log4j
> Fix For: 2.0.0
>
>
> As posted by [~rnibali] to the mailing list:
> I recently ran some tests using the preflight core, and wondered about the
> following message:
> {quote}
> java -jar preflight-app/target/preflight-app-2.0.0-SNAPSHOT.jar xml batch
> ./OpenSource/pdftests/
> log4j:WARN No appenders could be found for logger
> (org.apache.pdfbox.pdfparser.COSParser).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
> more info.
> {quote}
> The online PDFBox FAQ (kind of) told me how to solve this. However, using
> the example log4j.xml from PDFBox yields the following:
> java -Dlog4j.configuration=file:./preflight/src/test/resources/log4j.xml
> -jar preflight-app/target/preflight-app-2.0.0-SNAPSHOT.jar xml batch
> ./OpenSource/pdftests/
> {quote}
> log4j:ERROR No appender named \[console] could be found.
> log4j:ERROR No appender named \[rolling-file] could be found.
> {quote}
> My suggestion is to replace it with this for starters:
> {code}
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> <log4j:configuration debug="true" xmlns:log4j='
> http://jakarta.apache.org/log4j/'>
> <appender name="console" class="org.apache.log4j.ConsoleAppender">
> <layout class="org.apache.log4j.PatternLayout">
> <param name="ConversionPattern" value="%d{yyyy-MM-dd
> HH:mm:ss} %-5p %c{1}:%L - %m%n" />
> </layout>
> </appender>
> <root>
> <level value="DEBUG" />
> <appender-ref ref="console" />
> </root>
> </log4j:configuration>
> {code}
> Additionally, the FAQ entries should be updated with a correct example
> regarding the 'java -jar ..." case.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]