Skip to content

Commit 987e63f

Browse files
committed
Setup logging
1 parent 4a7a6dc commit 987e63f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

investing_bot_framework/core/context/bot_context.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def transition_to(self, bot_state: Type[BotState]) -> None:
3030
"""
3131
Function to change the running BotState at runtime.
3232
"""
33-
3433
self._state = bot_state(context=self)
3534

3635
def _check_state(self, raise_exception: bool = False) -> bool:

investing_bot_framework/core/context/states/data_provider_state.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import time
2+
import logging
23
from typing import List
34
from wrapt import synchronized
45

@@ -11,6 +12,8 @@
1112
from investing_bot_framework.core.executors.data_provider_executor import DataProviderExecutor
1213
from investing_bot_framework.core.configuration.config_constants import DEFAULT_MAX_WORKERS, SETTINGS_MAX_WORKERS
1314

15+
logger = logging.getLogger(__name__)
16+
1417

1518
class DataProviderScheduler(ExecutionScheduler):
1619
"""
@@ -108,7 +111,7 @@ def run(self) -> None:
108111

109112
# Collect all data_providers from the data_providers providers
110113
for data_provider in self.data_provider_executor.registered_data_providers:
111-
print("Data provider: {} finished running".format(data_provider.get_id()))
114+
logger.info("Data provider: {} finished running".format(data_provider.get_id()))
112115

113116
def stop(self) -> None:
114117
"""

0 commit comments

Comments
 (0)