self.log_message

lumibot.strategies.strategy.Strategy.log_message(self, message)

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.

Returns

message – Strategy name plus the original message.

Return type

str

Example

>>> self.log_message('Sending a buy order')