[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-dev] Thread and Process Ids in Aspects
|
You can get the current thread of execution by using
Thread.currentThread(). You can then log it along with
any other join point information. For example,
before() : tracePoint() {
System.out.println("Executing: " + thisJoinPointStaticPart);
System.out.println("In thread: " + Thread.currentThread());
}
-Ramnivas
--- Olufunmilayo Oluyemi Adepoju <ooa02@xxxxxxxxxxxx> wrote:
>
> Hello,
>
> I am currently using aspects to log and trace my programs, I would
> like,
> in addition to the standard information given by the joinpoints, to
> record the thread and/or process ids responsible for the joinpoints
> in
> my program. Is this possible in AspectJ?
>
> Thanks.
=====
Ramnivas Laddad
Author, AspectJ in Action
http://www.manning.com/laddad
http://www.amazon.com/exec/obidos/ASIN/1930110936
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com