Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Specifying a path to a Log Directory at run time; Report Viewer App
Specifying a path to a Log Directory at run time; Report Viewer App [message #718211] Tue, 23 August 2011 15:44 Go to next message
John Roberts is currently offline John RobertsFriend
Messages: 18
Registered: August 2011
Junior Member
Hi:

I am deploying to Weblogic, in an environment where the war is deployed and exploded in a Weblogic temp dir. This means by default that the Birt report viewer is going to log there by default. I cannot enter an absolute or relative path in the viewer web.xml file since that is not going to be reliable for me. I would like to somehow set the log path at runtime using an env var or props value. Is this possible??
Re: Specifying a path to a Log Directory at run time; Report Viewer App [message #718255 is a reply to message #718211] Tue, 23 August 2011 17:56 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

John

I do not know of an easy way to do this. One way would be to run a
report that stops report logging and restarts based on a new
configuration. For example look at this beforeFactory example:


importPackage(Packages.java.util.logging);
importPackage(Packages.org.eclipse.birt.report.engine.api.impl);


config = reportContext.getReportRunnable().getReportEngine().getConfig();
config.setLogMaxBackupIndex(1);
config.setLogRollingSize(5000);
var dir =
reportContext.getReportRunnable().getReportEngine().getConfig().getLogDirectory();
var newdir = "c:/test7";
config.setLogConfig(newdir, Level.FINEST );


EngineLogger.stopEngineLogging();
var logger = config.getLogger( );
var dest = config.getLogDirectory( );
var file = config.getLogFile( );
var level = config.getLogLevel( );
var rollingSize = config.getLogRollingSize( );
var maxBackupIndex = config.getLogMaxBackupIndex( );
EngineLogger.startEngineLogging( logger, dest, file, level,rollingSize,
maxBackupIndex );

Jason


On 8/23/2011 11:44 AM, John Roberts wrote:
> Hi:
>
> I am deploying to Weblogic, in an environment where the war is deployed
> and exploded in a Weblogic temp dir. This means by default that the Birt
> report viewer is going to log there by default. I cannot enter an
> absolute or relative path in the viewer web.xml file since that is not
> going to be reliable for me. I would like to somehow set the log path at
> runtime using an env var or props value. Is this possible??
Previous Topic:localization file
Next Topic:OOM in 2.6.2
Goto Forum:
  


Current Time: Thu Apr 25 06:58:21 GMT 2024

Powered by FUDForum. Page generated in 0.02826 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top