Redirect FOP messages to a file?

271 views
Skip to first unread message

Mark Craig

unread,
Oct 2, 2012, 9:55:02 AM10/2/12
to docbkx-to...@googlegroups.com
Hello again,

How can I redirect just the FOP messages to a file during the build? (For example, messages like 'WARNING: Font "Symbol,normal,700" not found. Substituting with "Symbol,normal,400".' and 'WARNING: Line 1 of a paragraph overflows the available area by 21733 millipoints. (See position 85:700)'.)

Regards,
Mark

Mimil

unread,
Oct 2, 2012, 10:43:28 AM10/2/12
to docbkx-to...@googlegroups.com
There is a showXslMessages to disable it but nothing to redirect the output in docbkx.

I had a fast look on google for redirecting xslt-message but i had no luck.

Cédric 
--
You received this message because you are subscribed to the Google Groups "Docbkx Tools Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/docbkx-tools-users/-/n2hdD-nl00cJ.
To post to this group, send email to docbkx-to...@googlegroups.com.
To unsubscribe from this group, send email to docbkx-tools-us...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/docbkx-tools-users?hl=en.

Mark Craig

unread,
Oct 3, 2012, 3:25:48 AM10/3/12
to docbkx-to...@googlegroups.com
Hi Cédric,

Thanks for your reply.

I notice that showXslMessages seems to be on by default for FO (though not for HTML). For example, if I use the archetype to create a new project, showXslMessages is not set, but I get quite a bit of output.

First, I create a new project:

$ mvn archetype:create -DgroupId=org.mcraig.test -D"artifactId=pdf-log-messages" -DarchetypeGroupId=com.agilejava.docbkx -DarchetypeArtifactId=docbkx-quickstart-archetype -DarchetypeVersion=2.0.15-SNAPSHOT
...
[INFO] BUILD SUCCESS
...

Then I run the pre-site goal for the new project:

$ cd pdf-log-messages/
$ mvn pre-site
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Docbkx Maven Quickstart Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- docbkx-maven-plugin:2.0.15-SNAPSHOT:generate-pdf (documentation identifier) @ pdf-log-messages ---
[INFO] Processing input file: book.xml
[INFO] Dumping to /Users/mark/Documents/workspace/pdf-log-messages/target/docbkx/generated/(gen)book.xml
[INFO] Applying customization parameters
[INFO] targetFileExtension pdf
[INFO] type fo
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:9607)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:10266)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:10923)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:11577)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:12228)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:12879)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:13527)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:14180)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:14833)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:15483)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:16135)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:16787)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:17436)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:18088)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:18740)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:19389)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:20042)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:20695)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not found. URI: images/draft.png. (See position 1:21345)
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Font "Symbol,normal,700" not found. Substituting with "Symbol,normal,400".
Oct 3, 2012 9:14:02 AM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Font "ZapfDingbats,normal,700" not found. Substituting with "ZapfDingbats,normal,400".
Oct 3, 2012 9:14:02 AM org.apache.fop.hyphenation.Hyphenator getHyphenationTree
SEVERE: Couldn't find hyphenation pattern en
[INFO] /Users/mark/Documents/workspace/pdf-log-messages/target/docbkx/pdf/book.pdf has been generated.
[INFO] /Users/mark/Documents/workspace/pdf-log-messages/target/docbkx/pdf/book.fo has been generated.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.760s
[INFO] Finished at: Wed Oct 03 09:14:03 CEST 2012
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------

I don't see showXslMessages set anywhere in the project.

$ find . -type f -exec grep -i showXslMessages {} \;

I thought maybe showXslMessages somehow defaulted to true in the case of FO. But even when I explicitly set <showXslMessages>false</showXslMessages> in the configuration for docbkx-maven-plugin, I still see all the same output. 

Is that perhaps a bug?

Regards,
Mark

Mimil Mimil

unread,
Oct 4, 2012, 1:56:36 AM10/4/12
to docbkx-to...@googlegroups.com
Hi Mark,

from the code point of view the showXslMessages property is handled in the AbstractTransformerMojo, the base of all other mojos, so it should work the same for all of them. I will have a look to it for the html in order to be sure.

the logs you pasted here for the pdf output I guess not an xsl message but I think a logger somewhere in FOP, I also need to have a look in order to be sure.

The default value for showXslMessages is false.

Maybe next week because I have not the time right now.

See you later,
Cedric,

Nat

unread,
Feb 12, 2014, 12:09:47 AM2/12/14
to docbkx-to...@googlegroups.com
Has this issue ever been looked at again?

If I run FOP on the command line, it is completely silent, so there must be a way of configuring it to not print these messages.

Nat 
To unsubscribe from this group, send email to docbkx-tools-users+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/docbkx-tools-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Docbkx Tools Users" group.
To post to this group, send email to docbkx-to...@googlegroups.com.
To unsubscribe from this group, send email to docbkx-tools-users+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/docbkx-tools-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Docbkx Tools Users" group.
To post to this group, send email to docbkx-to...@googlegroups.com.
To unsubscribe from this group, send email to docbkx-tools-users+unsub...@googlegroups.com.

Mimil Mimil

unread,
Feb 13, 2014, 5:14:00 PM2/13/14
to docbkx-to...@googlegroups.com
Hello,

no I didn't had a look to it. It is a logger configuration. If you think it has to be a pluging feature/bug, please fill an issue on the googlecode project that way we can follow it.

Regards,
Cedric,


To unsubscribe from this group and stop receiving emails from it, send an email to docbkx-tools-us...@googlegroups.com.

To post to this group, send email to docbkx-to...@googlegroups.com.

David Cramer

unread,
Feb 13, 2014, 5:21:09 PM2/13/14
to docbkx-to...@googlegroups.com
Regarding the image not found messages, you could set
<draftMode>no</draftMode> or set <draftWatermarkImage> to the location
of a png:

https://lists.oasis-open.org/archives/docbook-apps/201109/msg00140.html

Regards,
David

On 02/13/2014 04:14 PM, Mimil Mimil wrote:
> Hello,
>
> no I didn't had a look to it. It is a logger configuration. If you think
> it has to be a pluging feature/bug, please fill an issue on the
> googlecode project that way we can follow it.
>
> Regards,
> Cedric,
>
>
> On Wed, Feb 12, 2014 at 5:09 AM, Nat <nker...@gmail.com
> <mailto:nker...@gmail.com>> wrote:
>
> Has this issue ever been looked at again?
>
> If I run FOP on the command line, it is completely silent, so there
> must be a way of configuring it to not print these messages.
>
> Nat
>
>
> On Thursday, October 4, 2012 3:56:37 PM UTC+10, Mimi...@gmail.com
> <mailto:Mimi...@gmail.com> wrote:
>
> Hi Mark,
>
> from the code point of view the showXslMessages property is
> handled in the AbstractTransformerMojo, the base of all other
> mojos, so it should work the same for all of them. I will have a
> look to it for the html in order to be sure.
>
> the logs you pasted here for the pdf output I guess not an xsl
> message but I think a logger somewhere in FOP, I also need to
> have a look in order to be sure.
>
> The default value for showXslMessages is false.
>
> Maybe next week because I have not the time right now.
>
> See you later,
> Cedric,
>
> On Wed, Oct 3, 2012 at 9:25 AM, Mark Craig <mark....@gmail.com>
> wrote:
>
> Hi Cédric,
>
> Thanks for your reply.
>
> I notice that showXslMessages seems to be on by default for
> FO (though not for HTML). For example, if I use the
> archetype to create a new project, showXslMessages is not
> set, but I get quite a bit of output.
>
> First, I create a new project:
>
> $ mvn archetype:create -DgroupId=org.mcraig.test
> -D"artifactId=pdf-log-__messages"
> -DarchetypeGroupId=com.__agilejava.docbkx
> -DarchetypeArtifactId=docbkx-__quickstart-archetype
> -DarchetypeVersion=2.0.15-__SNAPSHOT
> ...
> [INFO] BUILD SUCCESS
> ...
>
> Then I run the pre-site goal for the new project:
>
> $ cd pdf-log-messages/
> $ mvn pre-site
> [INFO] Scanning for projects...
> [INFO]
>
> [INFO]
> ------------------------------__------------------------------__------------
> [INFO] Building Docbkx Maven Quickstart Archetype 1.0-SNAPSHOT
> [INFO]
> ------------------------------__------------------------------__------------
> [INFO]
> [INFO] ---
> docbkx-maven-plugin:2.0.15-__SNAPSHOT:generate-pdf
> (documentation identifier) @ pdf-log-messages ---
> [INFO] Processing input file: book.xml
> [INFO] Dumping to
> /Users/mark/Documents/__workspace/pdf-log-messages/__target/docbkx/generated/(gen)__book.xml
> [INFO] Applying customization parameters
> [INFO] targetFileExtension pdf
> [INFO] type fo
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:9607)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:10266)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:10923)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:11577)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:12228)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:12879)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:13527)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:14180)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:14833)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:15483)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:16135)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:16787)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:17436)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:18088)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:18740)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:19389)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:20042)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:20695)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> SEVERE: Image not found. URI: images/draft.png. (See
> position 1:21345)
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> WARNING: Font "Symbol,normal,700" not found. Substituting
> with "Symbol,normal,400".
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.events.__LoggingEventListener processEvent
> WARNING: Font "ZapfDingbats,normal,700" not found.
> Substituting with "ZapfDingbats,normal,400".
> Oct 3, 2012 9:14:02 AM
> org.apache.fop.hyphenation.__Hyphenator getHyphenationTree
> SEVERE: Couldn't find hyphenation pattern en
> [INFO]
> /Users/mark/Documents/__workspace/pdf-log-messages/__target/docbkx/pdf/book.pdf
> has been generated.
> [INFO]
> /Users/mark/Documents/__workspace/pdf-log-messages/__target/docbkx/pdf/book.fo
> <http://book.fo> has been generated.
> [INFO]
> ------------------------------__------------------------------__------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------__------------------------------__------------
> [INFO] Total time: 9.760s
> [INFO] Finished at: Wed Oct 03 09:14:03 CEST 2012
> [INFO] Final Memory: 7M/81M
> [INFO]
> ------------------------------__------------------------------__------------
>
> I don't see showXslMessages set anywhere in the project.
>
> $ find . -type f -exec grep -i showXslMessages {} \;
> $
>
> I thought maybe showXslMessages somehow defaulted to true in
> the case of FO. But even when I explicitly
> set <showXslMessages>false</sh__owXslMessages> in the
>> https://groups.google.com/d/__msg/docbkx-tools-users/-/__n2hdD-nl00cJ
>> <https://groups.google.com/d/msg/docbkx-tools-users/-/n2hdD-nl00cJ>.
>> To post to this group, send email to
>> docbkx-to...@__googlegroups.com.
>>
>> To unsubscribe from this group, send email to
>> docbkx-tools-use...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/__group/docbkx-tools-users?hl=en
>> <http://groups.google.com/group/docbkx-tools-users?hl=en>__.
>
> --
> You received this message because you are subscribed to
> the Google Groups "Docbkx Tools Users" group.
> To post to this group, send email to
> docbkx-to...@__googlegroups.com.
>
> To unsubscribe from this group, send email to
> docbkx-tools-use...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/__group/docbkx-tools-users?hl=en <http://groups.google.com/group/docbkx-tools-users?hl=en>__.
>
>
> --
> You received this message because you are subscribed to the
> Google Groups "Docbkx Tools Users" group.
> To post to this group, send email to
> docbkx-to...@__googlegroups.com.
>
> To unsubscribe from this group, send email to
> docbkx-tools-use...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/__group/docbkx-tools-users?hl=en
> <http://groups.google.com/group/docbkx-tools-users?hl=en>__.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Docbkx Tools Users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to docbkx-tools-us...@googlegroups.com
> <mailto:docbkx-tools-users%2Bunsu...@googlegroups.com>.
>
> To post to this group, send email to
> docbkx-to...@googlegroups.com
> <mailto:docbkx-to...@googlegroups.com>.

Mark Craig

unread,
Feb 14, 2014, 2:19:42 AM2/14/14
to docbkx-to...@googlegroups.com
Thanks and you're right, David, that the example could be updated to avoid those messages.

However even in this sample case, and even if it were fixed for the messages about the missing draft.png, there are lines of spurious FOP output that can lead anyone wondering what it means to substitute "Symbol,normal,400" for "Symbol,normal,700" and how severe it is not to have found the hyphenation pattern for en.

Then in a real book build there are the huge numbers of "Line N of a paragraph overflows the available area by MM millipoints." warnings, where it's not at all clear what the problem is from visual inspection of the output.

Not to mention fairly low level info messages.

If all of this were somehow summarized into a few messages that point to real problems, that would be ideal.
If that's too much work, then an option with a default of silence at least for WARNING and INFO level messages would be cool.

Regards,
Mark 


David Cramer

unread,
Feb 14, 2014, 10:54:12 AM2/14/14
to docbkx-to...@googlegroups.com
On 02/14/2014 01:19 AM, Mark Craig wrote:
> If all of this were somehow summarized into a few messages that point to
> real problems, that would be ideal.
> If that's too much work, then an option with a default of silence at
> least for WARNING and INFO level messages would be cool.

I agree. Let me know if you figure it out. I occasionally get
questions/complaints from my users about the fop noise too.

Regards,
David

Mimil Mimil

unread,
Feb 16, 2014, 3:52:38 PM2/16/14
to docbkx-to...@googlegroups.com
I will have a look to configure the loglevel of FOP.

Cedric,


natk

unread,
Mar 11, 2014, 10:45:15 PM3/11/14
to docbkx-to...@googlegroups.com
I've just tried to configure the log level of FOP by setting a commons-logging.properties (with various configurations), but it seems that the plugin is not applying this configuration, or that it is not picking it up from the classpath. I added it to src/main/resources (and it is getting copied to target/classes), so maven at least knows about it.

Is there some further configuration I would have to do on the plugin to make this work?

Nat  


--
You received this message because you are subscribed to a topic in the Google Groups "Docbkx Tools Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/docbkx-tools-users/jaB0eZsHFnw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to docbkx-tools-us...@googlegroups.com.

Mimil

unread,
Mar 12, 2014, 3:52:56 AM3/12/14
to docbkx-to...@googlegroups.com
For your information an issue has been logged: http://code.google.com/p/docbkx-tools/issues/detail?id=113

I did some tries and no success for now, but we will find.

Cédric 
For more options, visit https://groups.google.com/d/optout.

natk

unread,
Mar 12, 2014, 11:47:14 PM3/12/14
to docbkx-to...@googlegroups.com
I made some progress with this. I specified the location of the log4j configuration file as an absolute path on the maven command line (it seems that neither src/main/resources nor target/classes are on the classpath of the plugin):

mvn -Dlog4j.configuration=file:/path/to/file clean install

There must be a way of doing this in a more maven-robust way though...


For more options, visit https://groups.google.com/d/optout.

Mimil Mimil

unread,
Mar 13, 2014, 8:06:39 PM3/13/14
to docbkx-to...@googlegroups.com
Hello,

I think I managed to get something working using the API by introducing a dependecy to log4j.
committed in r306, a new property can be used <FopLogLevel> or -Ddocbkx.fopLogLevel
Values are: OFF,FATAL,ERROR,WARN,INFO,DEBUG,TRACE,ALL
Default is: WARN

I hope it does not impact too much the log4j configuration of the users

Regards,Cedric

natk

unread,
Mar 13, 2014, 10:52:39 PM3/13/14
to docbkx-to...@googlegroups.com
Does that mean this log level would global across FOP? What if there was a need to get more fine-tuned logging from FOP?

Is there no way of making the plugin pick up a log4j configuration file from the classpath?



Mimil

unread,
Mar 14, 2014, 4:48:43 AM3/14/14
to docbkx-to...@googlegroups.com
I set default to WARN, you can put FINE if you want. 
I will have a look for classpath but not sure anything else than log4j need it for now.
Asking the user to make a config file is not nice because he will have to learn this file.

Are you sure you need this feauture?

natk

unread,
Mar 16, 2014, 7:13:57 PM3/16/14
to docbkx-to...@googlegroups.com
Sorry, I didn't mean finer in the sense of more logging messages. I meant in the sense of having different levels for different loggers. e.g, the following would switch DEBUG on for the whole system, but set the LoggingEventListener, PropertyMaker and IFRenderer to WARN.

# Root logger option
log4j.rootLogger=DEBUG, stdout
 
# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %5p (%C:%L) - %m%n

log4j.logger.org.apache.fop.events.LoggingEventListener=WARN
log4j.logger.org.apache.fop.fo.properties.PropertyMaker=WARN
log4j.logger.org.apache.fop.render.intermediate.IFRenderer=WARN

I have got this working by adding log4j as a dependency (which should also work by adding one other commons logging implementations), then setting a system property for the log4.configuration property. I'm still not sure why this does not get picked up automatically (as src/main/resources should be on the classpath) but I'm not a maven plugin expert.

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>properties-maven-plugin</artifactId>
        <version>1.0-alpha-2</version>
        <executions>
          <!-- Set the log4j.configuration system property, which does not seem to be picked up from the classpath -->
          <execution>
            <id>set-system-properties</id>
            <phase>compile</phase>
            <goals>
              <goal>set-system-properties</goal>
            </goals>
            <configuration>
              <properties>
                <property>
                  <name>log4j.configuration</name>
                  <value>file:${project.basedir}/src/main/resources/log4j.properties</value>
                </property>
              </properties>
            </configuration>
          </execution>

        </executions>
      </plugin>

Nat

Reply all
Reply to author
Forward
0 new messages