self.log_message¶
- strategies.strategy.Strategy.log_message(self, message, color=None)¶
Logs an info message prefixed with the strategy name.
Uses python logging to log the message at the info level. Logging goes to the logging file, not the console.
- Parameters
message (str) – String message for logging.
color (str) – Color of the message. Eg. “red” or “green”.
- Returns
message – Strategy name plus the original message.
- Return type
str
Example
>>> self.log_message('Sending a buy order')