Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Intermediate
Oct 21, 2008

Setting Logger Output with FOP

The following code demonstrates how to set a logger for FOP. You can send the logger's messages to the System.out or in a file like this:

//to System.out
Logger logger=new ConsoleLogger(ConsoleLogger.LEVEL_INFO);
fop.setLogger(logger);
MessageHandler.setOutputMethod(MessageHandler.SCREEN);
MessageHandler.setScreenLogger(logger); 

//to a file (the log.txt file)
MessageHandler.setOutputMethod(MessageHandler.FILE);
MessageHandler.setLogfileName("log.txt",true);  
Leonard Anghel
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap