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

Ilker,

I feel one needs to make the decision to use AOP across the board.  If
all class that are to be used implement the appropriate logging calls,
then logging will be done as needed and developers will not need to
write traces, even including Strings.  Most Strings are written stating
variables that are to be passed (or were passed).  AOP supports the
capturing of these values in the pointcuts.  Additionally, you can use
whichever 'tracing' mechanism you wish within your Aspects such that
only INFO level (if using Log4J/Logger) messages are captured.  I think
it's a matter of perspective, but personally I like the ability to
completely remove the logging mechanism, not simply disable it.  In
addition, components that need to be debugged can have a great deal
more logging added relatively quickly whereas not using AOP would
require a good number of methods and classes to be modified.

I know this isn't an example, but in my opinion you must fully use AOP
to get the real logging benefits.  This is not the case for other
concerns as they aren't as pervasive.

--- ilker kiris <ilker@xxxxxxxxxx> wrote:
> 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


=====
Oron Gill Haus
IBM CSE Content Manager 8 - Sun Certified Programmer Java 2 1.4
office: (410) 539-3733 x1348
fax:    (410) 837-9535 c/o Oron
e-mail: ohaus@xxxxxxxxxxx
web: http://www.electronicscene.com/oron_haus


Back to the top