Skip to content

Commit 53be774

Browse files
committed
Add logging
1 parent 96d97c6 commit 53be774

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

investing_algorithm_framework/management/command_manager.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
import os
22
import sys
33
from colorama import Fore
4+
import logging
45

56
from investing_algorithm_framework.management import BaseCommand
67
from investing_algorithm_framework.core.resolvers import ClassResolver
78
from investing_algorithm_framework.management.utils import get_commands
89
from investing_algorithm_framework.management.commands.help import HelpCommand
910
from investing_algorithm_framework.core.exceptions import OperationalException
11+
from investing_algorithm_framework.configuration.config_constants \
12+
import FRAMEWORK_NAME
13+
14+
logger = logging.getLogger(FRAMEWORK_NAME)
1015

1116

1217
class ManagementUtility:
@@ -63,6 +68,7 @@ def execute(self) -> None:
6368
response = command.run_from_argv(self.argv)
6469
response = format_success_message(response)
6570
except Exception as e:
71+
logger.exception(e)
6672
response = format_error_message(str(e))
6773

6874
sys.stdout.write(response)

0 commit comments

Comments
 (0)