What I must do, to make logger log everything, as FOP.BAT (with -d option)
does  ?

In servlet I log FOP (0.20.4) actions into file:

FileOutputStream log_fos = new FileOutputStream(log_file);
PrintStream log_ps = new PrintStream(log_fos);
if (log == null) {
        Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
          PatternFormatter formatter = new PatternFormatter(
                "[%{priority}]: %{message}\n%{throwable}" );
              LogTarget target = null;
              target = new StreamTarget(log_ps, formatter);
              log = hierarchy.getLoggerFor("fop");
Driver driver = new Driver();
driver.setLogger(new org.apache.avalon.framework.logger.LogKitLogger(log));
Options options = new Options(new File(fop_conf_dir +  "userconfig.xml"));

Changing parameter in method log.setPriority doesn't help .

The FOP.BAT logs much more :

[DEBUG] Input mode:
[DEBUG] fo input file: d:\test.fo
[DEBUG] Output mode:
[DEBUG] pdf
[DEBUG] output file: d:\output.pdf
[DEBUG] user configuration file: C:
[DEBUG] debug mode on
[DEBUG] dump configuration
[DEBUG] quiet mode on
[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[DEBUG] reading user configuration file
[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[DEBUG] base directory: file:/d:/
[INFO] FOP 0.20.4
[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
etc ...

P.S.: I have some problem with upgrading from FOP version 0.20.3 to 0.20.4.
I wrote about it in thread " Strange error when upgrading from 0.20.3 to
All that is logged in my log file is :

[INFO]: building formatting object tree
[INFO]: [1]
...then error occurs

but at the same time this goes to the standard output (in JDeveloper):

[WARNING] Screen logger not set.
[ERROR] Failed to read font metrics file
/C:/JavaProject/Klient/classes/jORManClient/Reports/Metrics/arial.xml :
Invalid InputSource.

That error is also strange, the same link (from userconfig.xml) to the same
metrics file, worked in 0.20.3 :

<font metrics-file
kerning="yes" embed-file
  <font-triplet name="Arial" style="normal" weight="normal"/>

Reply via email to