On Fri, Sep 14, 2012 at 05:51:13PM +0900, Jeffrey Jones wrote:
> Hello all.
> 
> I find myself in unfamiliar territory by posting to this list but
> here we go.
> 
> I am doing some experimentation regarding logging in JSON formats
> for integration with systems like LogStash. So far things are
> reasonably good but there is one thing in rails which is making
> things a lot harder than they need to be.
> 
> At the moment rails has a large number of LogSubscribers such as
> ActiveRecord::ExplainSubscriber and ActionController::LogSubscriber
> which are automatically subscribed to the Notifications system.
> 
> What I would like to be able to do is stop this automatic
> subscribing from happening (in effect turning off the rails default
> logging system).
> 
> Currently this is not possible as far as I can tell, it is possible
> to go through all the various notifications and remove subscribers
> but this is a pain, is not very granular and is generally a very
> hack'ish situation.
> 
> Now, messing around with the internals of rails is something I do
> not have a huge amount of experience with so I would like to ask the
> core members:
> 
> 1. Before I start would there be any non-technical objections to a
> pull request to allow for us to disable all the default
> LogSubscribers?

I'd rather we don't have something specific to *log* subscribers.
You're right though, there is no way to find the *types* of listeners
listening on each channel.

Maybe just being able to access the list of subscribers would be enough?

> 2. If not would anyone be willing to offer advice / guidance /
> checking the design as I put this together?

Yes.  Put together an example of an API you would like (you don't need
to actually make it work), and I'll help you figure something out.

The more you can share about the problem you're trying to solve, the
more we can help!

-- 
Aaron Patterson
http://tenderlovemaking.com/

Attachment: pgpRtvA7LWO9F.pgp
Description: PGP signature

Reply via email to