Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » AspectJ Log4J and log4j.appender.dest1.layout.ConversionPattern= %l%n%m%n
AspectJ Log4J and log4j.appender.dest1.layout.ConversionPattern= %l%n%m%n [message #599847] Wed, 01 April 2009 16:00
Pierre8r is currently offline Pierre8r
Messages: 10
Registered: July 2009
Junior Member
Hello,

OS Windows XP
EDI Eclipse 3.4.1
AspectJ version: 1.6.4.20090304172355


http://www.manning.com/laddad/
I take the code source from :
http://www.manning-source.com/books/laddad/laddad_src_Aspect j-In-Action.zip
Reconfigure it to do a Eclipse ready :
Here the new zip :
http://cjoint.com/?edvUgUpaLP

If I change nothing at the log4j.properties file, everything seen OK.

log4j.properties file

log4j.rootCategory=DEBUG, dest1
log4j.appender.dest1=org.apache.log4j.ConsoleAppender
log4j.appender.dest1.layout=org.apache.log4j.PatternLayout

Output :
Entering [usingLog4jToolkit.Test.main]
Entering [usingLog4jToolkit.Inventory.<init>]
Entering [usingLog4jToolkit.Item.<init>]
Entering [usingLog4jToolkit.Item.<init>]
Entering [usingLog4jToolkit.Item.<init>]
Entering [usingLog4jToolkit.Inventory.addItem]
Entering [usingLog4jToolkit.Inventory.addItem]
Entering [usingLog4jToolkit.Inventory.addItem]
Entering [usingLog4jToolkit.ShoppingCart.<init>]
Entering [usingLog4jToolkit.ShoppingCartOperator.addShoppingCartItem]
Entering [usingLog4jToolkit.Inventory.removeItem]
Entering [usingLog4jToolkit.ShoppingCart.addItem]
Entering [usingLog4jToolkit.ShoppingCartOperator.addShoppingCartItem]
Entering [usingLog4jToolkit.Inventory.removeItem]
Entering [usingLog4jToolkit.ShoppingCart.addItem]


But if I add this line :
log4j.appender.dest1.layout.ConversionPattern= %l%n%m%n
to the log4j.properties file.
log4j.properties is :

log4j.rootCategory=DEBUG, dest1
log4j.appender.dest1=org.apache.log4j.ConsoleAppender
log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
log4j.appender.dest1.layout.ConversionPattern= %l%n%m%n

The output is not what I am looking for :

usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.Test.main]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.Inventory.<init>]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.Item.<init>]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.Item.<init>]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.Item.<init>]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.Inventory.addItem]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.Inventory.addItem]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.Inventory.addItem]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.ShoppingCart.<init>]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.ShoppingCartOperator.addShoppingCartItem]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.Inventory.removeItem]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.ShoppingCart.addItem]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.ShoppingCartOperator.addShoppingCartItem]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.Inventory.removeItem]
usingLog4jToolkit.TraceAspectV3.ajc$before$usingLog4jToolkit _TraceAspectV3$1$b314f86e(TraceAspectV3.aj:20)
Entering [usingLog4jToolkit.ShoppingCart.addItem]

Where my mistake.

Regards,
Previous Topic:AspectJ internal compiler error: NPE on AsmRelationshipProvider.addRelationship
Next Topic:AspectJ Log4J and log4j.appender.dest1.layout.ConversionPattern= %l%n%m%n
Goto Forum:
  


Current Time: Fri Aug 01 01:56:00 EDT 2014

Powered by FUDForum. Page generated in 0.01373 seconds