Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2022-02-13 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
-+-
 Reporter:  Flavio Curella   |Owner:  Flavio
 |  Curella
 Type:  New feature  |   Status:  closed
Component:  Error reporting  |  Version:  dev
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  runserver logging| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"cdd4ff67d23b80741047eaf6b180dc67a782dfbd" cdd4ff67]:
 {{{
 #!CommitTicketReference repository=""
 revision="cdd4ff67d23b80741047eaf6b180dc67a782dfbd"
 Refs #25684 -- Removed double newline from request/response output of
 runserver.

 Follow up to 0bc5cd628042bf0a44df60a93085a4f991a84dfb.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.20ea3cc6e0903c1f12c6f48ba6d7b54f%40djangoproject.com.


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2016-10-27 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
-+-
 Reporter:  Flavio Curella   |Owner:  Flavio
 |  Curella
 Type:  New feature  |   Status:  closed
Component:  Error reporting  |  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  runserver logging| Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by jonathan-golorry):

 I'm not really sure what's going on so I don't want to open a ticket
 myself, but I'm consistently getting Mark's "Logged from file basehttp.py"
 error with DjangoRestFramework when closing a tab of the browsable API
 while it's uploading a file.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2016-09-01 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  closed
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:  fixed
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by timgraham):

 I haven't seen a new ticket. Please open one with steps to reproduce.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2016-09-01 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  closed
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:  fixed
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by haydenc):

 Replying to [comment:40 marktranchant]:

 Did this new ticket get created? I can't find it, would be good to have
 somewhere to post workarounds even if it's already been addressed.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2016-08-02 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  closed
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:  fixed
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by timgraham):

 New ticket with steps to reproduce.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2016-08-02 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  closed
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:  fixed
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by marktranchant):

 Replying to [comment:38 Tim Graham ]:
 > In [changeset:"0bc5cd628042bf0a44df60a93085a4f991a84dfb" 0bc5cd62]:
 > {{{
 > #!CommitTicketReference repository=""
 revision="0bc5cd628042bf0a44df60a93085a4f991a84dfb"
 > Fixed #25684 -- Made runserver use logging for request/response output.
 >
 > Thanks andreif for the contributing to the patch.
 > }}}

 Since upgrading to 1.10, my test suite (from {{{manage.py test}}}) now
 kicks up this error from {{{ServerFormatter.format()}}} method. Doesn't
 affect my tests. Not sure how to flag this error: here, or new ticket?

 {{{
 Traceback (most recent call last):
   File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit
 msg = self.format(record)
   File "/usr/lib/python2.7/logging/__init__.py", line 734, in format
 return fmt.format(record)
   File "/home/my-venv/lib/python2.7/site-packages/django/utils/log.py",
 line 173, in format
 if args[1][0] == '2':
 IndexError: tuple index out of range
 Logged from file basehttp.py, line 85
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2016-02-08 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  closed
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:  fixed
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by Tim Graham ):

 In [changeset:"f0a84112ba1c9b253ebbcbd5d6942f01a7bee9d3" f0a84112]:
 {{{
 #!CommitTicketReference repository=""
 revision="f0a84112ba1c9b253ebbcbd5d6942f01a7bee9d3"
 Refs #25684 -- Silenced logging output in servers tests.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2016-01-11 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  closed
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:  fixed
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by Tim Graham ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"0bc5cd628042bf0a44df60a93085a4f991a84dfb" 0bc5cd62]:
 {{{
 #!CommitTicketReference repository=""
 revision="0bc5cd628042bf0a44df60a93085a4f991a84dfb"
 Fixed #25684 -- Made runserver use logging for request/response output.

 Thanks andreif for the contributing to the patch.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2016-01-04 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by carljm):

 The release notes should of course mention the change. I don't think we
 need detailed instructions for how to re-enable it for people who may have
 disabled the default logging config; it's enough to say (something like)
 "runserver now logs each request to the `django.server` logger instead of
 outputting it directly to console; if your logging config overrides
 Django's defaults, see the default logging config (link) for an example of
 how to configure runserver logging with color output."

 Disabling Django's default logging config is an advanced usage, anybody
 doing that should know enough about logging to configure things
 appropriately from there. (And really, a manual logging config that
 silently discards logging output from unknown loggers by default is kind
 of broken; someone with such a setup shouldn't be surprised to be missing
 some logging output.)

 Also, we're talking about a development convenience here, not something
 that breaks production code-paths, so the backwards-compatibility concern
 level is lower.

 I think the benefits of this change are major, in terms of added
 flexibility to filter and customize runserver logging output without
 needing to hack core Django code.

 And any possibility of replacing runserver remains quite remote AFAICS --
 there are a lot of hard questions there that remain unanswered, and I'm
 not aware of anyone actively working on answering them. I certainly don't
 think it's anywhere near imminent enough to provide justification for
 halting all improvements to runserver.

 So IMO this change is definitely worth moving forward.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2016-01-01 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by timgraham):

 * needs_better_patch:  0 => 1


Comment:

 Assuming we do want to move forward with this, I've reviewed the pull
 request.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2016-01-01 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by timgraham):

 I have some concerns that anyone
 [https://docs.djangoproject.com/en/1.9/topics/logging/#disabling-logging-
 configuration disabling logging] will be confused why `runserver` doesn't
 log anymore. They'll need instructions for how to reenable it. Do the
 benefits of this change outweigh the costs to these users?

 If we end up replacing the `runserver` machinery with something like
 gunicorn (#21978), I wonder if the logging situation would change again
 (i.e. would our version of `WSGIRequestHandler` be obsolete?). I don't
 know how close that change is to happening (maybe it will never happen),
 but I just wanted to raise these points for consideration so we can focus
 our time and avoid needlessly annoying our users by making conflicting
 changes in one area over several consecutive releases.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-16 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by claudep):

 * needs_better_patch:  1 => 0


Comment:

 Unchecking `Patch needs improvement` will restack the patch on review
 queues.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-16 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by fcurella):

 I've updated my PR to use `django.server`. Let me know what else needs to
 be done :)

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-15 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by claudep):

 I'm fine with `django.server` logger, too. Your explanation makes sense.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-14 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by andreif):

 according to the ​release notes, Django 1.9 drops django.request, but the
 topic guide on logging ​still mentions it and does not mention the
 deprecation.

 @fcurella, I believe Django 1.9 does not drop `django.request`, just skips
 special config for it, see #24526 and
 https://github.com/django/django/pull/4389/

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-14 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by andreif):

 Wouldn't it feel strange if the logger has `runserver` in it's name? As I
 see it, user starts the server using `runserver` command. The logging is
 done by the server, not the command which started the server. The server
 could be started via something else, not related to `runserver` command.
 So `django.server` would fit better from my point of view and also
 looks/sounds better.

 `django.request` deals with application level logging so using it (or its
 sublogger) for the server which runs the application is not what one would
 expect.

 Personally, I don't see any disadvantage of `django.server` but since I am
 (seemingly) the only one advocating for it, I wonder why one would not
 prefer it?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-09 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by timgraham):

 (I was advocating for either choice myself.)

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-09 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by claudep):

 What about logging to `django.runserver`? I don't see what we gain by
 using a sublogger of `django.request`. Those messages are for different
 components anyway.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-09 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by timgraham):

 You can still log using `django.request` -- they'll just propagate to the
 `django` logger. I'll give the PR a detailed review later as I am a bit
 swamped due to activity from Django Under the Hood sprints. :-)

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-09 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by fcurella):

 according to the
 [https://github.com/django/django/blob/master/docs/releases/1.9.txt#L829-L832
 release notes], Django 1.9 drops `django.request`, but the topic guide on
 logging
 [https://github.com/django/django/blob/master/docs/topics/logging.txt#L471
 still mentions it]  and does not mention the deprecation.

 If I keep the logger name as `django.request.runserver` (or
 `django.request`), I'm invalidating the release note. If I change it to
 something else, I should proably remove that paragraph from the logging
 guide.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-09 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by fcurella):

 I've noticed just now that Django 1.9 deprecates the `django.request`
 logger (https://docs.djangoproject.com/en/1.9/releases/1.9/#changes-to-
 the-default-logging-configuration) , so we can use anything under
 `django.*`.

 Any suggestion?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-08 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by andreif):

 My changes are merged now and the log message is not changed with this PR,
 so the behavior is preserved and I think it's time to merge it as soon as
 we agree on the logger name.

 I will play with the log message order and parts in #25704

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-08 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by fcurella):

 > As far as I see, django.request is used for application and we probably
 want to distinguish between those log messages and the ones made by server

 That's the reason why I went with `django.request.runserver` instead of
 just `django.request`.

 That said, we can pick a new namespace and update the docs accordingly.
 I'd like more consensus on which one to use.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-08 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by andreif):

 I have moved server time in https://github.com/fcurella/django/pull/3 so
 it's not hardcoded in message and used in formatters format.

 Discard my comment about global_settings, `DEFAULT_LOGGING` is the right
 place :)

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-08 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by andreif):

 As far as I see, `django.request` is used for application and we probably
 want to distinguish between those log messages and the ones made by
 server...

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-07 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by fcurella):

 According to https://docs.djangoproject.com/en/1.8/topics/logging/#django-
 request-logger, the logger should be under `django.request`. Additionally,
 4xx should warning and 5xx should be errors.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-07 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by andreif):

 I've just realized that this feature will finally allow to filter out
 static requests using logging filters instead of messing in the Django
 source code. This is great! :)

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-07 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by andreif):

 1. I believe it would be better to use `django.server` instead of
 `django.request.runserver` for logger name:

 {{{
 INFOdjango.server: [07/Nov/2015 20:38:22] "GET / HTTP/1.1" 200 2
 }}}
 vs
 {{{
 INFOdjango.request.runserver: [07/Nov/2015 20:38:22] "GET / HTTP/1.1"
 200 2
 }}}

 2. The date-time should probably not be a part of the message since it's
 usually configured in formatter. However, by default python logs without
 time info. Maybe `LOGGING` dict in `global_settings.py` can have
 `django.server` logging config...

 {{{
 2015-11-07 20:38:22,627 INFO  django.server: [07/Nov/2015 20:38:22] "GET /
 HTTP/1.1" 200 2
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-07 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by andreif):

 It would also be great to have response time in the log message, see
 #25704

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-07 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+

Comment (by andreif):

 It would be great if we could place the response code at the beginning of
 the log message ;)

 so it is

 {{{
 [07/Nov/2015 17:37:05] HTTP/1.1 200 "GET /inbox/" 216874
 [07/Nov/2015 17:37:05] HTTP/1.1 304 "GET
 /static/CACHE/css/f090a416387d.css" 0
 [07/Nov/2015 17:37:05] HTTP/1.1 304 "GET
 /static/CACHE/css/df20af4b0d04.css" 0
 [07/Nov/2015 17:37:05] HTTP/1.1 304 "GET /static/img/logo.svg" 0
 }}}

 instead of

 {{{
 [07/Nov/2015 17:37:05] "GET /inbox/ HTTP/1.1" 200 216874
 [07/Nov/2015 17:37:05] "GET /static/CACHE/css/f090a416387d.css HTTP/1.1"
 304 0
 [07/Nov/2015 17:37:05] "GET /static/CACHE/css/df20af4b0d04.css HTTP/1.1"
 304 0
 [07/Nov/2015 17:37:05] "GET /static/img/logo.svg HTTP/1.1" 304 0 0ms 2ms
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-07 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+
Changes (by claudep):

 * needs_better_patch:  0 => 1
 * has_patch:  0 => 1


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-07 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by carljm):

 I don't actually see a performance concern mentioned there. There are
 three concerns:

 1. Adding complexity to out-of-the-box local-dev experience. I think this
 is a non-issue, if the default logging config results in the same behavior
 we have currently. No additional setup should be needed.

 2. Losing colorization of devserver messages. I agree this would be a
 problem, but as mentioned above we should be able to preserve this with a
 custom formatter.

 3. "It's a feature that can be achieved with pipes and grep" -- this
 objection could apply to any use of the logging framework in Django. It
 doesn't really make sense to allow much of Django's logging output to be
 configured using Python's logging framework, but in this specific case
 prevent that and require using totally different techniques instead.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-07 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by charettes):

 Thanks for the benchmarks.

 Here's [https://groups.google.com/forum/#!searchin/django-
 developers/django.request|sort:date/django-
 developers/154YBWR7K8U/aHtef9DoRFcJ the discussion] I was referring to
 when I raised the performance argument point.

 > 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™.

 #21949 is also a related ticket.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-06 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by fcurella):

 Since `runserver` is not supposed to be used in production, I'm really
 concerned about performance. I've namespaced the logger so the formatter
 should never be called in production (assuming no-one uses `runserver` in
 production)

 I've done some profiling anyway, and here are the results:

 on `master`, `DEBUG = False`:

 `ab -k -n 15000 http://127.0.0.1:8000/`:

 {{{
 Concurrency Level:  1
 Time taken for tests:   22.961 seconds
 Complete requests:  15000
 Failed requests:0
 Non-2xx responses:  15000
 Keep-Alive requests:0
 Total transferred:  3435000 bytes
 HTML transferred:   111 bytes
 Requests per second:653.28 [#/sec] (mean)
 Time per request:   1.531 [ms] (mean)
 Time per request:   1.531 [ms] (mean, across all concurrent requests)
 Transfer rate:  146.09 [Kbytes/sec] received

 Connection Times (ms)
   min  mean[+/-sd] median   max
 Connect:00   0.1  0   5
 Processing: 11   0.4  1  29
 Waiting:11   0.3  1  28
 Total:  12   0.4  1  29
 ERROR: The median and mean for the total time are more than twice the
 standard
deviation apart. These results are NOT reliable.

 }}}

 on `master`, `DEBUG = True`:

 `ab -k -n 15000 http://127.0.0.1:8000/`:

 {{{
 Concurrency Level:  1
 Time taken for tests:   23.380 seconds
 Complete requests:  15000
 Failed requests:0
 Keep-Alive requests:0
 Total transferred:  28725000 bytes
 HTML transferred:   26505000 bytes
 Requests per second:641.57 [#/sec] (mean)
 Time per request:   1.559 [ms] (mean)
 Time per request:   1.559 [ms] (mean, across all concurrent requests)
 Transfer rate:  1199.81 [Kbytes/sec] received

 Connection Times (ms)
   min  mean[+/-sd] median   max
 Connect:00   0.1  0   4
 Processing: 11   0.8  1  98
 Waiting:11   0.8  1  98
 Total:  12   0.8  1  98
 WARNING: The median and mean for the total time are not within a normal
 deviation
 These results are probably not that reliable.
 }}}

 Post-patch, `DEBUG = False`:

 `ab -k -n 15000 http://127.0.0.1:8000/`:

 {{{
 Concurrency Level:  1
 Time taken for tests:   20.975 seconds
 Complete requests:  15000
 Failed requests:0
 Non-2xx responses:  15000
 Keep-Alive requests:0
 Total transferred:  3435000 bytes
 HTML transferred:   111 bytes
 Requests per second:715.14 [#/sec] (mean)
 Time per request:   1.398 [ms] (mean)
 Time per request:   1.398 [ms] (mean, across all concurrent requests)
 Transfer rate:  159.93 [Kbytes/sec] received

 Connection Times (ms)
   min  mean[+/-sd] median   max
 Connect:00   0.1  0   5
 Processing: 11   0.5  1  52
 Waiting:11   0.5  1  52
 Total:  11   0.5  1  52

 }}}

 Post-patch, `DEBUG = True`:

 `ab -k -n 15000 http://127.0.0.1:8000/`:

 {{{
 Concurrency Level:  1
 Time taken for tests:   24.314 seconds
 Complete requests:  15000
 Failed requests:0
 Keep-Alive requests:0
 Total transferred:  28725000 bytes
 HTML transferred:   26505000 bytes
 Requests per second:616.92 [#/sec] (mean)
 Time per request:   1.621 [ms] (mean)
 Time per request:   1.621 [ms] (mean, across all concurrent requests)
 Transfer rate:  1153.71 [Kbytes/sec] received

 Connection Times (ms)
   min  mean[+/-sd] median   max
 Connect:00   1.3  0 139
 Processing: 12   2.9  1 127
 Waiting:11   2.4  1 127
 Total:  12   3.2  1 140
 }}}

 Note that the patch skips the formatter if `DEBUG` is `False` by using the
 `require_debug_true` filter.

 Without the filter, the results are:

 Post-patch, `DEBUG = False`, no filter:

 `ab -k -n 15000 http://127.0.0.1:8000/`:

 {{{
 Concurrency Level:  1
 Time taken for tests:   21.105 seconds
 Complete requests:  15000
 Failed requests:0
 Non-2xx responses:  15000
 Keep-Alive requests:0
 Total transferred:  

Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-06 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by fcurella):

 I've done some preliminary work on
 https://github.com/django/django/pull/5560

 Let me know if anything problematic jumps to the eye, otherwise I can
 proceed with tests and docs.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-06 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by claudep):

 I guess the current behavior is simply due to Python itself using
 `sys.stderr` in `http.server.BaseHTTPRequestHandler.log_message`.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-05 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by timgraham):

 See also #21429 -- BaseCommand should use logging instead of custom output
 wrappers.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-05 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by charettes):

 > I've always wondered why the runserver output didn't use logging; it
 seems like an obvious candidate for it. I may be missing something (in
 which case hopefully someone else will chime in), but it seems to me that
 option (a) -- replace stderr.write(...) with logging calls, and adjust the
 default logging config so they are still shown -- is the right one.

 While I can find the exact discussion I remember there was concerns about
 performance.

 > One reason I can think of why perhaps this hasn't been done is the color
 used to mark different response status codes in the runserver output? I
 would think it should be possible to preserve that with the right custom
 logging handler, though.

 Appropriate formatters should do!

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-05 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by carljm):

 * stage:  Unreviewed => Accepted


Comment:

 I've always wondered why the runserver output didn't use logging; it seems
 like an obvious candidate for it. I may be missing something (in which
 case hopefully someone else will chime in), but it seems to me that option
 (a) -- replace `stderr.write(...)` with logging calls, and adjust the
 default logging config so they are still shown -- is the right one.

 One reason I can think of why perhaps this hasn't been done is the color
 used to mark different response status codes in the runserver output? I
 would think it should be possible to preserve that with the right custom
 logging handler, though.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-05 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+--
 Reporter:  fcurella   |Owner:  fcurella
 Type:  New feature|   Status:  assigned
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by fcurella):

 * owner:   => fcurella
 * status:  new => assigned


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-05 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
---+--
 Reporter:  fcurella   |Owner:
 Type:  New feature|   Status:  new
Component:  Error reporting|  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  runserver logging  | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by fcurella):

 * keywords:   => runserver logging


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-05 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
-+--
 Reporter:  fcurella |Owner:
 Type:  New feature  |   Status:  new
Component:  Error reporting  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--
Changes (by fcurella):

 * version:  1.8 => master


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-05 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
-+--
 Reporter:  fcurella |Owner:
 Type:  New feature  |   Status:  new
Component:  Error reporting  |  Version:  1.8
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--
Changes (by fcurella):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> this is slightly related to https://code.djangoproject.com/ticket/25523
>
> All output in ``core.servers.basehttp`` (and possibly ``fastcgi`` - I
> haven't checked that yet) uses ``sys.stderr.write``, bypassing the
> logging subsystem.
>
> In order to have it use the ``LOGGING`` settings, I can see 3 options:
>
> a) make it always use ``logger.info(msg)`` and change the default
> `LOGGING` settings appropriately
> b) make it always use both ``sys.stdout.write`` and ``logger.info``
> c) add an option to runserver to switch behaviour
>
> I'm willing to work on the patch (in fact, I have option 2) already
> working), I just need to know if this is something we want and what
> direction we want to go.

New description:

 this is slightly related to https://code.djangoproject.com/ticket/25523

 All output in `core.servers.basehttp` (and possibly `fastcgi` - I haven't
 checked that yet) uses ``sys.stderr.write``, bypassing the logging
 subsystem.

 In order to have it use the `LOGGING` settings, I can see 3 options:

 a) make it always use `logger.info(msg)` and change the default `LOGGING`
 settings appropriately
 b) make it always use both `sys.stdout.write` and ``logger.info`
 c) add an option to runserver to switch behaviour

 I'm willing to work on the patch (in fact, I have option 2) already
 working), I just need to know if this is something we want and what
 direction we want to go.

--

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


Re: [Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-05 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
-+--
 Reporter:  fcurella |Owner:
 Type:  New feature  |   Status:  new
Component:  Error reporting  |  Version:  1.8
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--
Description changed by fcurella:

Old description:

> this is slightly related to https://code.djangoproject.com/ticket/25523
>
> All output in `core.servers.basehttp` (and possibly `fastcgi` - I haven't
> checked that yet) uses ``sys.stderr.write``, bypassing the logging
> subsystem.
>
> In order to have it use the `LOGGING` settings, I can see 3 options:
>
> a) make it always use `logger.info(msg)` and change the default `LOGGING`
> settings appropriately
> b) make it always use both `sys.stdout.write` and ``logger.info`
> c) add an option to runserver to switch behaviour
>
> I'm willing to work on the patch (in fact, I have option 2) already
> working), I just need to know if this is something we want and what
> direction we want to go.

New description:

 this is slightly related to https://code.djangoproject.com/ticket/25523

 All output in `core.servers.basehttp` (and possibly `fastcgi` - I haven't
 checked that yet) uses ``sys.stderr.write``, bypassing the logging
 subsystem.

 In order to have it use the `LOGGING` settings, I can see 3 options:

 a) make it always use `logger.info(msg)` and change the default `LOGGING`
 settings appropriately
 b) make it always use both `sys.stdout.write` and `logger.info`
 c) add an option to runserver to switch behaviour

 I'm willing to work on the patch (in fact, I have option 2) already
 working), I just need to know if this is something we want and what
 direction we want to go.

--

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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


[Django] #25684: Runserver doesn't use `LOGGING` configuration

2015-11-05 Thread Django
#25684: Runserver doesn't use `LOGGING` configuration
-+-
 Reporter:  fcurella |  Owner:
 Type:  New feature  | Status:  new
Component:  Error reporting  |Version:  1.8
 Severity:  Normal   |   Keywords:
 Triage Stage:  Unreviewed   |  Has patch:  0
Easy pickings:  0|  UI/UX:  0
-+-
 this is slightly related to https://code.djangoproject.com/ticket/25523

 All output in ``core.servers.basehttp`` (and possibly ``fastcgi`` - I
 haven't checked that yet) uses ``sys.stderr.write``, bypassing the logging
 subsystem.

 In order to have it use the ``LOGGING`` settings, I can see 3 options:

 a) make it always use ``logger.info(msg)`` and change the default
 `LOGGING` settings appropriately
 b) make it always use both ``sys.stdout.write`` and ``logger.info``
 c) add an option to runserver to switch behaviour

 I'm willing to work on the patch (in fact, I have option 2) already
 working), I just need to know if this is something we want and what
 direction we want to go.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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