[rules-users] FileLogger base dir with Drools running in JBoss

Kris Verlaenen Kris.Verlaenen at cs.kuleuven.be
Fri Jul 23 06:23:24 EDT 2010


Heiko,

The file logger simply creates a log file on the location you specify. 
If you specify a relative path, it will be created relative to the
directory the application is running in (which is basically the bin
directory of your app server in most cases when you deploy to an app
server).  You can also just specify a full path (use / in front).

I would suggest simply adding some configurability in your setup code if
you need multiple locations based on the context:

String path = ... // compute configurable path here
KnowledgeRuntimeLogger logger =
  KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, path, 500);

Kris

Quoting tdtappe <tappe at transdata.net>:

> 
> Newbie question:
> 
> I run Drools 5.0.1 on a JBoss 5.1.
> 
> Via
> 
> KnowledgeRuntimeLogger logger =
> KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, "drools",
> 500);
> 
> I let Drools write a log file for me. But I don't like the directory
> to
> which Drools write the log file.
> On my developer's PC it's the bin-directory of JBoss, on our JBoss
> server
> it's /usr/lib/cgi-bin
> Especially the latter is the problem, because the user running jboss
> isn't
> allowed to write to this path.
> 
> How can I configure the path in a way that it's for instance relative
> to
> running jboss server (both: on my PC and on the server side).
> 
> --Heiko
> -- 
> View this message in context:
>
http://drools-java-rules-engine.46999.n3.nabble.com/FileLogger-base-dir-with-Drools-running-in-JBoss-tp989280p989280.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 




Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the rules-users mailing list