|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
API for access log eventsHi,
I want to write a Nexus plugin which forwards access events into my own proprietary log system. In particular I want to log every access of an artifact (similar to an Apache access.log). Is there API in Nexus which allows to register a listener for these events? Thanks, Kelly |
|
|
Re: API for access log eventshi, there:
we've already planed this feature in 1.4: https://issues.sonatype.org/browse/NEXUS-1353 On Wed, Apr 1, 2009 at 8:10 AM, K H <kehsiao@...> wrote:
-- - juven |
|
|
Re: API for access log eventsHi there,
yes, there is. All you need is to implement an EventInspector interface, make it as Plexus component (same role), and you can catch and do whatever you want with the event. All Plexus components with this role will be discovered and will start receiving _all_ system events (like the RepositoryItemEvent, the superclass of all "access" events).
One thing to watch: make processing of the event _fast_, since by doing some long work in the inspect() method will cause a general "slowdown" on Nexus level (serving artifacts). If you want to do some special stuff (ie. insert into RDBMS or such), or other time-intensive work, implement a Queue (inspect() should be producer) and decouple the actual processing (consumer) to keep Nexus Core away from blocking. You would do that in separate thread.
~t~ On Wed, Apr 1, 2009 at 2:10 AM, K H <kehsiao@...> wrote:
|
|
|
Re: API for access log eventsThanks for the pointers to the right direction. By the way, what is the time line for the 1.4 release?
Regards, KH
|
| Free embeddable forum powered by Nabble | Forum Help |