![]() |
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.
Once after having Fuji M4, here are the steps that are need to create Logging Aspects Project:
Logging aspect is ready and you see the specified log content is available at the specified interception points.
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 | Necessity | Description | Default 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: