I think there is the possibility for two things here. First is adding a
few functions to make it easier to see all / types of subscribers
to the notifications system which would be a good thing.
For my purposes though what I would really like to do is be able to stop
the default Rails subscribers from subscribing in the first place.
At the moment they all automatically subscribe as soon as they are
loaded (Subscribing is done automatically in the same file as they are
defined.).
>> 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!
>
The problem I have is that I want to write JSON formatted log files that
contain the same information as you get from the basic rails ones (to
start with), something like the following:
https://gist.github.com/3694987 but it is not as easy as it should be to
silence the default rails logging system.
I could of course kludge things and just use separate logfile for the
JSON stuff and redirect the default loggers to /dev/null or something
but that feels wrong. I do actually have a plan for dealing with people
using the logger with plain strings but I would still like to get rid of
all the noise from the rails default subscribers.
I could also do something like this in a gem's railtie:
https://gist.github.com/3740558 but this is imprecise as you can get.
What I would love to be able to do is something along the lines of
config.default_subscibers.disable = true
in application.rb (or a railtie) to stop all of them from subscribing
themselves in the first place, it just seems like the cleaner approach.
Cheers
Jeff