log#

API documentation for tradeexecutor.cli.log Python module in Trading Strategy.

Module description#

High-grade logging facilities.

We have a custom level logging.TRADE that we use to log trade execution to Discord and such.

Functions#

get_ring_buffer_handler()

setup_custom_log_levels([enable_trade_high])

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

setup_discord_logging(name, webhook_url[, ...])

Setup Discord logger.

setup_file_logging(log_filename[, ...])

Create log file output.

setup_in_memory_logging(logger)

setup_logging([log_level, in_memory_buffer, ...])

Setup root logger and quiet some levels.

setup_logstash_logging(logstash_server, ...)

Setup Logstash logger.

setup_notebook_logging([log_level, show_process])

Setup logger in notebook / backtesting environments.

setup_pytest_logging([request, mute_requests])

Setup logger in pytest environment.

setup_strategy_logging([default_log_level])

Setup logging for backtesting.

setup_telegram_logging(telegram_api_key, ...)

Setup Telegram logger.