This content has been marked as final.
Show 2 replies
-
1. Re: How to use loggers (log4j or other) in rules depoyed in the Kie server ?
simplex-software Sep 13, 2015 4:46 AM (in response to simplex-software)The following seems to work:
global Logger LOGGER;
rule ....
......................
when
......................
then
LOGGER = Logger.getLogger("...");
LOGGER.debug ("HelloWorld *****");
.......................
Of course, this is not exactly the right way to do it as the logger has to be instantiated in each rule. This is because the following:
global Logger LOGGER = Logger.getLogger("...");
raises compilation errors.
So, I'm looking for suggestions of how to better use log4j in rules.
-
2. Re: How to use loggers (log4j or other) in rules depoyed in the Kie server ?
jjfd Dec 14, 2015 12:35 AM (in response to simplex-software)I guess you can instantiate the logger outside the rules, and then use
ksession.setGlobal("logger", logger);