I've got to the point in the logging implementation where I want to
add support for logging related settings in settings.py.
The current idea (suggested by Ivan Sagalaev) is to allow for a
standard Django-style setting that look something like this:
LOGGING = {
'django.db.sql': {
'
On Oct 11, 2:32 am, Simon Willison wrote:
> Alternatively, should I just stick my log configuring code in the
> Setting class constructor and leave well alone?
For the moment, I've done exactly that:
http://github.com/simonw/django/commit/eb9737129501a6d17014afdb55c8bb4d5222b693
Full patch aga
On Oct 11, 2:32 am, Simon Willison wrote:
> Is there a straight forward solution to this that I've been missing,
> or is it an ongoing problem? If it's a problem, can we fix it? What
> makes it so difficult to fix (I'm going to guess there's no easy
> solution, or we would have sorted it out ages
On Sat, Oct 10, 2009 at 10:52 PM, Simon Willison
wrote:
>
> On Twitter Malcolm pointed me here: http://code.djangoproject.com/ticket/5685
That's my ticket, and I had mostly forgotten about it.
As you've found out, there is no way to hook into the bootstrap
process. For signals, we just stuff t
On Oct 12, 9:03 am, Benjamin Slavin wrote:
> That means: I'm strongly in favor of any hook to allow code to be run
> before the Django environment is setup, and I'm not tied to any
> particular path of solving the problem.
I'm trying to avoid taking on any Django projects at the moment other
tha
On Oct 12, 2009, at 11:04 AM, Simon Willison
wrote:
>
> On Oct 12, 9:03 am, Benjamin Slavin wrote:
>> That means: I'm strongly in favor of any hook to allow code to be run
>> before the Django environment is setup, and I'm not tied to any
>> particular path of solving the problem.
>
> a v
On Mon, Oct 12, 2009 at 12:09 PM, Jeremy Dunck wrote:
> Also, I bet Marty knows this area well from his book work.
Actually, I didn't research much on the initialization process as a
whole, if there indeed is such a beast. I started with what happens
when Python actually encounters a model defin
On Oct 12, 5:04 pm, Simon Willison wrote:
> On Oct 12, 9:03 am, Benjamin Slavin wrote:
>
> > That means: I'm strongly in favor of any hook to allow code to be run
> > before the Django environment is setup, and I'm not tied to any
> > particular path of solving the problem.
>
> I'm trying to avo
> Maybe I'm oversimplifying this - and I'm sure if you'll tell me if I
> am ;-) - but how about the following: add a setting called e.g.
> SETUP_CALLBACKS (or whatever name you prefer) which will be an
> iterable (say, tuple) of callables which are called from
> Settings.__init__ in the same way
On Oct 13, 3:10 am, Benjamin Slavin wrote:
> There really is no such thing as "INSTALLED_APPS loading". I think
> you mean "model loading"... if so, it's not quite so simple. Maybe
> there's a way to make this approach work, but it's at least not as
> easy as "let's just add these two settings".
On Tue, Oct 13, 2009 at 2:17 AM, Vinay Sajip wrote:
> I know it was sloppy of me to call it "INSTALLED_APPS loading" as that
> happens in db/models/loading.py - I thought it would be clear from my
> saying I was talking about calling from Settings.__init__().
Ok... I see what you're saying. I'v
On Oct 13, 3:12 pm, Benjamin Slavin wrote:
> On Tue, Oct 13, 2009 at 2:17 AM, Vinay Sajip wrote:
> > I know it was sloppy of me to call it "INSTALLED_APPS loading" as that
> > happens in db/models/loading.py - I thought it would be clear from my
> > saying I was talking about calling from Settin
On Oct 13, 3:12 pm, Benjamin Slavin wrote:
> It looks like I may actually be able to put a bit of time toward a new
> implementation for this, so I'll keep the list posted.
As I said, great! But I thought I would have a go, too. Here's what I
did: changed Django in two places, conf/__init__.py
Benjamin Slavin wrote:
> * Logging may need to come even earlier. If you truly want to log
> everything, you'll want to run that code first.
Is it really the case that we want to log everything? I believe that
logging after initialization is enough. And for my example of a logging
handler that
On Oct 15, 8:21 am, Ivan Sagalaev wrote:
> Is it really the case that we want to log everything? I believe that
> logging after initialization is enough. And for my example of a logging
That may be true if you're a Django user, but for a Django developer
working on Django internals, logging can
15 matches
Mail list logo