|
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 |
|
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??
|
|
|
Powered by
FUDForum. Page generated in 0.03237 seconds