xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eckard_Buch...@tonbeller.com
Subject Antwort: Re: Changing logging behavior in an embedded application.
Date Tue, 07 Mar 2006 07:23:56 GMT
> FOP does have a few System.out.println calls in its source code but
> these are only in places where those are ok, i.e. in command-line
> handling code

IMHO this is not the case with the TTFReader. It tells you about each file 
it reads and writes. If you convert a couple of files at once this is a 
little inconvenient. Maybe it should have a silent mode? BTW if you embed 
the TTF Reader i would prefer getting exceptions when something goes wrong 
rather than geting null return (and a stack trace in stdout)

Eckard





Jeremias Maerki <dev@jeremias-maerki.ch> 
07.03.2006 08:05
Bitte antworten an
fop-users@xmlgraphics.apache.org


An
fop-users@xmlgraphics.apache.org
Kopie

Thema
Re: Changing logging behavior in an embedded application.






Hmm, FOP does not do anything special with warning messages as opposed
to debug- or info-level messages. If you managed you reroute all logging
to java.util.logger it's a matter of configuring that thing correctly.
FOP does have a few System.out.println calls in its source code but
these are only in places where those are ok, i.e. in command-line
handling code. Your other post about the Verdana font showed that you're
not calling FOP's command-line so everything does go through the logging
abstraction.

Did you specify a logging config file using 
"-Djava.util.logging.config.file="
and properly set up the handlers?

On 06.03.2006 13:07:23 Tracey Zellmann wrote:
> Thanks.
> 
> I had been to that page. I have got a basic solution. I can get 
everything 
> logged to a java.util.Logger, behaving the way I want. However, I am 
still 
> getting all the FOP WARNING messages coming to the console. I was able 
to 
> get a workable solution to that using redirection from the main command 
that 
> starts my Swing application, 2>fopMessages.txt sends all the command 
warning 
> messages to that file and overwrites each session. However, I would like 
to 
> find a cleaner approach.
> 
> Is there a simple way to "turn off" the logging to the console?
> 
> ----- Original Message ----- 
> From: "Jeremias Maerki" <dev@jeremias-maerki.ch>
> To: <fop-users@xmlgraphics.apache.org>
> Sent: Monday, March 06, 2006 3:52 AM
> Subject: Re: Changing logging behavior in an embedded application.
> 
> 
> > Apache FOP uses Apache Jakarta Commons Logging as a logging 
abstraction
> > kit. [1] should give you the basics and has links to further 
information
> > on configuring logging the way you want it to behave. I hope that 
helps.
> >
> > [1] 
http://xmlgraphics.apache.org/fop/0.91/embedding.html#basic-logging
> >
> > On 04.03.2006 20:44:55 Tracey Zellmann wrote:
> >> I have dug through what documentation I can find, but it hasn't 
helped 
> >> me,
> >> so maybe the list can give me some guidance.
> >>
> >> I have my application running successfully.  I am using fop
> >> 0.91beta-bin-jdk1.4 It publishes a PDF using FOP within another java
> >> application, not from the command line, so I believe you would call 
it
> >> embedded.
> >>
> >> I need to change the way logging messages are handled. Currently, I 
am
> >> getting a large number of warning messages printed to the console. 
With
> >> Jeremias Maerki's help, I can see they are caused my some namespace 
> >> issues
> >> with some imported svg images I am using from MS Visio. Essentially, 
they
> >> can be ignored, and that is what I have been doing. However, next 
week, I
> >> have to turn this over to the first wave of "normal" users, so I 
don't 
> >> want
> >> to overwhelm them with these messages.
> >>
> >> I would like all messages to go to a log file, not the console. I 
would
> >> prefer that warning level messages go to a file that is typically
> >> overwritten, so they don't accumulate. Anything higher than warning 
> >> should
> >> go to another file which does append and accumulates the message 
history. 
> >> I
> >> am pretty sure I could handle this using Java's java.util.logging 
API.
> >> However, I am not sure how to get hold of and change the current 
behavior 
> >> of
> >> FOP logging.
> >>
> >> Can someone illuminate this for me?
> >>
> >> Thanks.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



Mime
View raw message