backtrader.bokeh.tabs.log module

Log tab.

Displays strategy execution logs.

class backtrader.bokeh.tabs.log.LogHandler[source]

Bases: Handler

Log handler.

Captures log messages and stores them in specified storage.

__init__(storage_key, max_records=1000)[source]

Initialize log handler.

Parameters:
  • storage_key – Key to identify log storage in global dictionary.

  • max_records – Maximum number of log records to keep (default: 1000).

emit(record)[source]

Emit a log record.

Parameters:

record – Log record to process.

backtrader.bokeh.tabs.log.getlogger(name='backtrader', col=None)[source]

Get logger with log handler.

Parameters:
  • name – Logger name

  • col – Custom columns (optional)

Returns:

logging.Logger instance

class backtrader.bokeh.tabs.log.LogTab[source]

Bases: BokehTab

Log tab.

Displays log information during strategy execution.

cols

Column configuration for display

__init__(app, figurepage, client=None, cols=None)[source]

Initialize log tab.

Parameters:
  • app – Bokeh application instance.

  • figurepage – Figure page instance.

  • client – Optional client instance.

  • cols – Custom column configuration for log display.

cols = ['Time', 'Level', 'Message']
backtrader.bokeh.tabs.log.LogTabs(cols)[source]

Create log tab class with custom columns.

Parameters:

cols – Column configuration

Returns:

Custom LogTab class