﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21429	BaseCommand should use logging instead of custom output wrappers	Nical		"Since python offers the powerful logging class, django.core.management.base.BaseCommand should use it to output messages instead of using custom output wrappers (django.core.management.base.OutputWrapper).

Doing so, we could override those loggers in the settings.py file.

Instead of having two wrappers in a command and having to do:

{{{
class Command(BaseCommand):
  def handle(self):
    self.stdout.write('this is an info message')
    self.stderr.write('this is an error message')
}}}

We could do

{{{
class Command(BaseCommand):
  def handle(self):
    self.output.info('this is an info message')
    self.output.error('this is an error message')
    # and even
    self.output.warning('this is a warning message')
}}}

The style_func and ending arguments that the django.core.management.base.OutputWrapper.write method takes could be removed and be configured at once in a overriding custom logger."	New feature	new	Core (Management commands)	dev	Normal		command output logger		Accepted	1	0	0	1	0	0
