setup_custom_log_levels#

API documentation for tradeexecutor.cli.log.setup_custom_log_levels Python function.

setup_custom_log_levels(enable_trade_high=False)[source]#

Create a new logging level TRADE that is between INFO and WARNING.

This level is used to log trade execution to Discord etc. trader followed stream.

Add

  • logging.TRADE: Log level for verbose trade output for Discord diagnostics

  • logging.TRADE_HIGH: Log level made trade decisions - this only logs

    successful trade decisions, not any errors. It is designed for the Teleegram bot.

Parameters:

enable_trade_high – Enable special TRADE_HIGH logging level in live trade execution.