Refactor logging configuration to both Django management commands lintmigrations and makemigrations

This commit is contained in:
David Wobrock committed 2022-03-13 16:51:29 +01:00
1 parent 26a8aaa993
commit 5f11f9417f
3 files changed
+18 -11

No files matched your search

@@ -9,7 +9,7 @@ from django.db.migrations.writer import MigrationWriter
from django_migration_linter import MigrationLinter
from ..utils import register_linting_configuration_options
from ..utils import configure_logging, register_linting_configuration_options
def ask_should_keep_migration():
@@ -42,6 +42,7 @@ class Command(MakeMigrationsCommand):
self.database = options["database"]
self.exclude_migrations_tests = options["exclude_migration_tests"]
self.warnings_as_errors = options["warnings_as_errors"]
configure_logging(options["verbosity"])
return super(Command, self).handle(*app_labels, **options)
def write_migration_files(self, changes):