Skip to content

Commit

Permalink
fix logging override
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandroroiz committed Aug 29, 2024
1 parent 99dd882 commit d3f0117
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
5 changes: 3 additions & 2 deletions confidant/scripts/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
logging = importlib.import_module(settings.LOGGING_MODULE)
logger = logging.getLogger(__name__)

logger.addHandler(logging.StreamHandler(sys.stdout))
logger.setLevel(logging.INFO)
if settings.LOGGING_MODULE == 'logging':
logger.addHandler(logging.StreamHandler(sys.stdout))
logger.setLevel(logging.INFO)


class ArchiveCredentials(Command):
Expand Down
5 changes: 3 additions & 2 deletions confidant/scripts/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@

logging = importlib.import_module(settings.LOGGING_MODULE)
logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler(sys.stdout))
logger.setLevel(logging.INFO)
if settings.LOGGING_MODULE == 'logging':
logger.addHandler(logging.StreamHandler(sys.stdout))
logger.setLevel(logging.INFO)


def is_old_unicode_set(values):
Expand Down
5 changes: 3 additions & 2 deletions confidant/scripts/migrate_bool.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@

logging = importlib.import_module(settings.LOGGING_MODULE)
logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler(sys.stdout))
logger.setLevel(logging.INFO)
if settings.LOGGING_MODULE == 'logging':
logger.addHandler(logging.StreamHandler(sys.stdout))
logger.setLevel(logging.INFO)


class GenericCredential(Model):
Expand Down
5 changes: 3 additions & 2 deletions confidant/scripts/restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
logging = importlib.import_module(settings.LOGGING_MODULE)
logger = logging.getLogger(__name__)

logger.addHandler(logging.StreamHandler(sys.stdout))
logger.setLevel(logging.INFO)
if settings.LOGGING_MODULE == 'logging':
logger.addHandler(logging.StreamHandler(sys.stdout))
logger.setLevel(logging.INFO)


class RestoreCredentials(Command):
Expand Down
5 changes: 3 additions & 2 deletions confidant/scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
logging = importlib.import_module(settings.LOGGING_MODULE)
logger = logging.getLogger(__name__)

logger.addHandler(logging.StreamHandler(sys.stdout))
logger.setLevel(logging.INFO)
if settings.LOGGING_MODULE == 'logging':
logger.addHandler(logging.StreamHandler(sys.stdout))
logger.setLevel(logging.INFO)


class ManageGrants(Command):
Expand Down

0 comments on commit d3f0117

Please sign in to comment.