Index Changes
This is version 4. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]
Fuji Home

Logging Aspect

Logging Aspect is an aspect and provides functionality of logging which includes free-form messages and tokens.

How logging aspect is different from logging?

Logging is part of the business component and you need to decide what needs to be logged at the design time. If any change is needed, then that business component has to go entire development life cycle .. design, development, built, test, deploy and the entire project may need to be restarted to pick up the changes.

Logging aspect is complementary to the logging. Logging aspect is external to components. The information thats being exchanged among components and the state of that message exchange can be logged. You can deploy this aspect any time you want and you can undeploy at your will without affecting your main project. And, its javafree thus no Java developer is needed.

How to create Logging Aspect

In Fuji Milestone 4 (M4), the aspects are taken a huge step forward to provide javafree aspects. Aspects user just need to specify set of properties to enjoy the aspects.

Once after having Fuji M4, here are the steps that are need to create Logging Aspects Project:

  1. In Netbeans, create a maven based project from Logging Aspect Archetype.
  2. For that project, edit log.properties under Other Sources/Aspects/Log.
  3. Build, Deploy and start the project

Logging aspect is ready and you see the specified log content is available at the specified interception points.

How to create more logging aspects

You can create as many logging aspects as you want in either of the following ways:
  1. Create multiple property files under Other Sources/Aspects/Log. Please ensure that "name" property is unique.
  2. Create multiple logging aspect projects from the provided logging aspect archetype.

Properties of Logging Aspect

You can specify any of the following interceptor related properties. You can refer How to write an Interceptor for the recent supported properties.

Property For logging, intercept Message Exchange based on
name Name of the Logging aspect. Must be unique in Fuji run time. By default, project name is chosen.
provider service provider
consumer service consumer
message message type : ( "in", "out")
service service name, can be the local name or the fully qualified service name
endpoint endpoint name
status message exchange status : {"DONE", "ERROR", "ACTIVE"}

And you can specify any of the following logging properties:

Property NecessityDescriptionDefault Value
log.content Needed Free form messages, tokens, Header/Status/Message/All Exchange:{exchangeid} Status:{status}
log.xpaths Optional Logs evaluated XPath expressions. Ex: /Employee/FName None
log.token.<TokenName> Optional User defined token. None
log.console Optional True/False. Determines whether output is directed to console. If no other output option is chosen, its true.
log.config.dir Optional Directory name where the specified log.config.files resides. <FujiDir>\trunk\packaging\release-packages\felix\target\classes\fuji
log.config.files Optional File names where logging is directed. None
log.config.patterns Optional The pattern for naming the output file. Refer: http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/FileHandler.html None
log.config.uris Optional URIs None
log.config.file.limit Optional the maximum number of bytes to write to any one file 0
log.config.file.count Optional The number of files to use. 1
log.config.file.append Optional true/false. Specifies append mode true
log.config.file.formatter Optional xml/simple simple
log.header Optional Entire log.content can be given a heading of your choice. None
aspect.type Needed Determines type of aspect and is used by aspects framework. log
aspect.identity Needed Unique name for the aspect. If not specified, unique name is generated

Built-in tokens:

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This particular version was published on 12-Feb-09 16:59 PM, -0800 by RameshDara