To get expected result, I modified three line codes in NewRuleCalculator.java
line 45: ruleMap.put(new Pattern("*/computation"), new ComputationAction2());
line 51: ruleMap.put(new Pattern("/computation/new-rule"), new
NewRuleAction());
line 57:
simpleConfigurator.doConfigure("src/main/java/chapters/onJoran/newrule/newRule.xml");
Below are outputs from IDE:
cd C:\opensourcecodes\qpid\logback\logback-examples;
JAVA_HOME=C:\\Java\\jdk1.7.0_15 M2_HOME=C:\\Maven\\apache-maven-3.0.4
C:\\Maven\\apache-maven-3.0.4\\bin\\mvn.bat "-Dexec.args=-classpath %classpath
chapters.onJoran.newRule.NewRuleCalculator"
-Dexec.executable=C:\\Java\\jdk1.7.0_15\\bin\\java.exe
-Dexec.classpathScope=runtime -DskipTests=true process-classes
org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
Scanning for projects...
------------------------------------------------------------------------
Building Logback Examples Module 1.0.12-SNAPSHOT
------------------------------------------------------------------------
[build-helper:add-test-source]
Test Source directory:
C:\opensourcecodes\qpid\logback\logback-examples\src\test\scala added.
[resources:resources]
[debug] execute contextualize
Using 'UTF-8' encoding to copy filtered resources.
Copying 3 resources
[compiler:compile]
Compiling 1 source file to
C:\opensourcecodes\qpid\logback\logback-examples\target\classes
[exec:exec]
The computation named [toto] resulted in the value 30
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 2.254s
Finished at: Mon Apr 01 13:08:33 PDT 2013
Final Memory: 11M/182M
Ming Qin
Cell Phone Number: 949-388-9898
From: [email protected]
To: [email protected]
Subject: No expected Result from Running NewRuleCalculator.java in LogBack
Example Module
Date: Sun, 31 Mar 2013 17:54:47 -0600
Hi: I run the NewRuleCalculator.java to learn Joran feature - interpreter to
learn new rules on the fly.
I modified line of 57 as
simpleConfigurator.doConfigure("src/main/java/chapters/onJoran/newRule/newRule.xml");
first of all, newRule.xml has typo for xml element "new-rule" , it should be
"newRule" after correcting above error, the NewRuleCalculator.java run fine
but didn't generate expected result as "The computation named [toto] resulted
in the value 30"
See below output from my IDE:
cd D:\OpenSourceCodes\logback-master\logback-examples;
JAVA_HOME=D:\\Java\\jdk1.7.0_15 "\"D:\\Program Files\\NetBeans
7.3\\java\\maven\\bin\\mvn.bat\"" "-Dexec.args=-classpath %classpath
chapters.onJoran.newRule.NewRuleCalculator"
-Dexec.executable=D:\\Java\\jdk1.7.0_15\\bin\\java.exe
-Dexec.classpathScope=runtime -DskipTests=true process-classes
org.codehaus.mojo:exec-maven-plugin:1.2.1:execScanning for projects...
------------------------------------------------------------------------Building
Logback Examples Module
1.0.12-SNAPSHOT------------------------------------------------------------------------
[build-helper:add-test-source]Test Source directory:
D:\OpenSourceCodes\logback-master\logback-examples\src\test\scala added.
[resources:resources][debug] execute contextualizeUsing 'UTF-8' encoding to
copy filtered resources.Copying 3 resources
[compiler:compile]Compiling 1 source file to
D:\OpenSourceCodes\logback-master\logback-examples\target\classes
[exec:exec]------------------------------------------------------------------------BUILD
SUCCESS------------------------------------------------------------------------Total
time: 1.532sFinished at: Sun Mar 31 16:53:19 PDT 2013Final Memory:
9M/24M------------------------------------------------------------------------
Source code : downloading logback-master.zip from
https://github.com/qos-ch/logbackIDE: NetBeans 7.3JDK version: 32 bit window
version Oracle JDK 1.7.0_15Platform: window xp
Ming Qin
Cell Phone Number: 949-388-9898
_______________________________________________
logback-dev mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-dev