Re: feature request - use logging in WSGIRequestHandler

2015-11-07 Thread charettes
FWI a new ticket[1] with what looks like a sane implementation to add this 
level of logging to the runserver command has been created.

I'll make sure to copy all the concerns raised by Russ over there and you 
might want to chime in the review process.

Simon

[1] https://code.djangoproject.com/ticket/25684

Le jeudi 29 mai 2014 16:38:06 UTC+2, Tino de Bruijn a écrit :
>
>
> On Thu, May 29, 2014 at 3:40 AM, Russell Keith-Magee <
> rus...@keith-magee.com > wrote:
>
>> However, there's a cost - we'd be adding the requirement for a logging 
>> configuration for something that is only ever used during development. So 
>> we'd end up complicating the process of deploying the devserver, which is 
>> one of those things that is supposed to Just Work™ out of the box.
>>
>> I *think* this would also mean losing the colorisation of devserver 
>> messages, and for me, colorisation of output of the devserver is a higher 
>> priority than the need to filter specific lines out of devserver output 
>> (don't quote me on this one though -- it might be possible to preserve 
>> colorisation. Some experimentation may be required).
>>
>
> Isn't this easy to set up with defaults for logging? Like we already do 
> for `django.request` and `django.security`[1]?
>
> And it appears colouring log messages is possible with a custom formatter 
> [2].
>
> +1 from me to have more control over the output of the devserver.
>
>
> Tino
>
> [1] 
> https://github.com/django/django/blob/778ce245dd466bce1b19f89e52cf9ed8f1b46513/django/utils/log.py
> [2] 
> http://stackoverflow.com/questions/384076/how-can-i-color-python-logging-output
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/602a9efc-cfd3-4063-94b5-a3a8e8bdc28d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: feature request - use logging in WSGIRequestHandler

2014-05-29 Thread Tino de Bruijn
On Thu, May 29, 2014 at 3:40 AM, Russell Keith-Magee <
russ...@keith-magee.com> wrote:

> However, there's a cost - we'd be adding the requirement for a logging
> configuration for something that is only ever used during development. So
> we'd end up complicating the process of deploying the devserver, which is
> one of those things that is supposed to Just Work™ out of the box.
>
> I *think* this would also mean losing the colorisation of devserver
> messages, and for me, colorisation of output of the devserver is a higher
> priority than the need to filter specific lines out of devserver output
> (don't quote me on this one though -- it might be possible to preserve
> colorisation. Some experimentation may be required).
>

Isn't this easy to set up with defaults for logging? Like we already do for
`django.request` and `django.security`[1]?

And it appears colouring log messages is possible with a custom formatter
[2].

+1 from me to have more control over the output of the devserver.


Tino

[1]
https://github.com/django/django/blob/778ce245dd466bce1b19f89e52cf9ed8f1b46513/django/utils/log.py
[2]
http://stackoverflow.com/questions/384076/how-can-i-color-python-logging-output

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANQFsQDsOnjUR5hWGj3sYWg%3Dx3%3DLNeO-sLzHw3X-Uif-T40L-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: feature request - use logging in WSGIRequestHandler

2014-05-29 Thread Michael Manfre
Today I learned that the devserver messages are supposed to be in color.

Having all output from Django controlled by logging would be a nice
improvement.

Regards,
Michael Manfre


On Wed, May 28, 2014 at 9:40 PM, Russell Keith-Magee <
russ...@keith-magee.com> wrote:

>
> On Wed, May 28, 2014 at 3:35 AM, Martín Massera 
> wrote:
>
>> Hi sometimes when you are developing you get so much output in the
>> console, especially when you have many medias on the page. It would be nice
>> to use the logging system to remove those messages, but right now stderr is
>> being used.
>>
>> Using the logging system for choosing whether we want to see this output
>> or not sounds like a natural solution, right?
>>
>>
>> http://stackoverflow.com/questions/23833642/django-how-to-filter-out-get-static-and-media-messages-with-logging/23845219
>>
>>
> Well, logging *could* be used for this, sure.
>
> However, there's a cost - we'd be adding the requirement for a logging
> configuration for something that is only ever used during development. So
> we'd end up complicating the process of deploying the devserver, which is
> one of those things that is supposed to Just Work™ out of the box.
>
> I *think* this would also mean losing the colorisation of devserver
> messages, and for me, colorisation of output of the devserver is a higher
> priority than the need to filter specific lines out of devserver output
> (don't quote me on this one though -- it might be possible to preserve
> colorisation. Some experimentation may be required).
>
> It's also a feature that can be achieved using pipes and grep, which would
> be more in line with the broader Unix philosophy.
>
> In summary: I don't personally see a particularly compelling case for this
> feature. However, the real test will be whether you can come up with an
> implementation that doesn't overly complicate the deployment of the
> devserver for the case that *most* users need it - a simple server that
> Just Works™.
>
> Yours,
> Russ Magee %-)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAJxq8482r1TJy9rv7xGimCz27mVqtkbC6M3u%2BUirWeVKQBA5kQ%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAGdCwBto2KKSX31deTmqV7qabx7aCFjeHLy9T5Qd6K%2BBuUYiow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: feature request - use logging in WSGIRequestHandler

2014-05-28 Thread Russell Keith-Magee
On Wed, May 28, 2014 at 3:35 AM, Martín Massera wrote:

> Hi sometimes when you are developing you get so much output in the
> console, especially when you have many medias on the page. It would be nice
> to use the logging system to remove those messages, but right now stderr is
> being used.
>
> Using the logging system for choosing whether we want to see this output
> or not sounds like a natural solution, right?
>
>
> http://stackoverflow.com/questions/23833642/django-how-to-filter-out-get-static-and-media-messages-with-logging/23845219
>
>
Well, logging *could* be used for this, sure.

However, there's a cost - we'd be adding the requirement for a logging
configuration for something that is only ever used during development. So
we'd end up complicating the process of deploying the devserver, which is
one of those things that is supposed to Just Work™ out of the box.

I *think* this would also mean losing the colorisation of devserver
messages, and for me, colorisation of output of the devserver is a higher
priority than the need to filter specific lines out of devserver output
(don't quote me on this one though -- it might be possible to preserve
colorisation. Some experimentation may be required).

It's also a feature that can be achieved using pipes and grep, which would
be more in line with the broader Unix philosophy.

In summary: I don't personally see a particularly compelling case for this
feature. However, the real test will be whether you can come up with an
implementation that doesn't overly complicate the deployment of the
devserver for the case that *most* users need it - a simple server that
Just Works™.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAJxq8482r1TJy9rv7xGimCz27mVqtkbC6M3u%2BUirWeVKQBA5kQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


feature request - use logging in WSGIRequestHandler

2014-05-27 Thread Martín Massera
Hi sometimes when you are developing you get so much output in the console, 
especially when you have many medias on the page. It would be nice to use 
the logging system to remove those messages, but right now stderr is being 
used.

Using the logging system for choosing whether we want to see this output or 
not sounds like a natural solution, right? 

http://stackoverflow.com/questions/23833642/django-how-to-filter-out-get-static-and-media-messages-with-logging/23845219

take care!

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/6198a68e-9440-46ff-8ec7-f0bdeee411b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.