Fixed #21429 -- Added builtin logging support to BaseCommand.

https://code.djangoproject.com/ticket/21429
the *same* as