Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Is there any REAL logging (tracing) example of AOP



Hello ilker,

I used aspectJ to trace WebSphere code. I guess you may agree WebSphere is
a real project :-).

The trace I have done prints all method calls before and after (with
parameters in before advice, return value in after advice), catch blocks
(with exception message, and line number if available), uncaught exceptions
(exception message and line number again). All trace string are indented
nicely based on thread. And thread number or name can be easily added to
trace (WebSphere already provided thread number and timestamp in trace
stream so trace aspect does not need generate them).

I am working on dynamic setting to enable/disable trace on fly, based on
three levels of control:

1. kind of a join point
2. component of package of a declaring class
3. modifiers of a method/constructor

Based on my experience, it is good enough to debug.  But if you have other
ideas about what should be in a trace let me know.

Regards,

Bo

----------------------------------------------------------
  Bo Yi
  WAS L3 Support
  IBM Toronto Lab
  A2-713/Q2Z/8200/MKM
  8200 Warden Ave. Markham ONT. L6G 1C7
  Phone: 905-413-4819
  Tie Line: 969-4819
  E-Mail: boyi@xxxxxxxxxx



|---------+------------------------------->
|         |           ilker kiris         |
|         |           <ilker@xxxxxxxxxx>  |
|         |           Sent by:            |
|         |           aspectj-users-admin@|
|         |           eclipse.org         |
|         |                               |
|         |                               |
|         |           12/10/2003 09:02 AM |
|         |           Please respond to   |
|         |           aspectj-users       |
|---------+------------------------------->
  >---------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                     |
  |       To:       aspectj-users@xxxxxxxxxxx                                                                           |
  |       cc:                                                                                                           |
  |       Subject:  [aspectj-users] Is there any REAL logging (tracing) example of AOP                                  |
  |                                                                                                                     |
  |                                                                                                                     |
  >---------------------------------------------------------------------------------------------------------------------|



Hello folks,

I must admit that I'm a new bee on AOP.
From the examples and papers that I can see, logging is commonly used as
an example.
But in real life, logging tools are mainly used as tracing tools.
Meaning, in various parts of code, different strings need to be printed
to logs.
In that case all these logging examples DON'T really apply.
Because the examples that I see, assume the logging is used to print the
name of Class:method:parametersPassedIn for each method.
But this is NOT how logging is used (as a trace).
Hence I don't see how AOP can be used for logging.
Any AOP logging example that addresses what I'm saying here?

Regards,
-- ilker  (I hope my question isn't too arrogant :)
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users




Back to the top