Feature Request
Problem
When running IB Gateway/TWS in automated environments (Docker, cloud VMs, CI/CD), users need to enable API logging for debugging. Currently this requires:
- Manual GUI configuration (not suitable for ephemeral VMs)
- Patching tws.xml files (fragile, breaks on IBKR updates)
How IBC Already Solves Similar Problems
IBC has existing mechanisms to automatically configure TWS/Gateway settings by interacting with the GUI:
AUTO_LOGOFF_TIME - configures automatic logoff time
READ_ONLY_API - enables/disables read-only API mode
AcceptNonBrokerageAccountWarning=yes - accepts paper trading warning
- Dialog handling for login, connection approvals, etc.
Proposed Solution
Add similar automatic configuration for API logging settings by interacting with the Global Configuration → API → Settings dialog.
Suggested Environment Variables
CREATE_API_MESSAGE_LOG_FILE=true
API_LOGGING_LEVEL=Detail # Options: Error, Warning, System, Notice, Incoming, Outgoing, Detail
INCLUDE_MARKET_DATA_IN_API_LOG=false
How It Would Work
IBC would:
- Navigate to Configure → Settings → API → Settings (or File → Global Configuration → API → Settings)
- Check/uncheck "Create API message log file" based on
CREATE_API_MESSAGE_LOG_FILE
- Set "Logging Level" dropdown based on
API_LOGGING_LEVEL
- Optionally check "Include market data in API log file" based on
INCLUDE_MARKET_DATA_IN_API_LOG
- Click Apply/OK
Benefits
- Consistent with existing IBC architecture
- Works regardless of tws.xml structure changes
- Leverages existing window automation infrastructure
- No XML patching required
References
Feature Request
Problem
When running IB Gateway/TWS in automated environments (Docker, cloud VMs, CI/CD), users need to enable API logging for debugging. Currently this requires:
How IBC Already Solves Similar Problems
IBC has existing mechanisms to automatically configure TWS/Gateway settings by interacting with the GUI:
AUTO_LOGOFF_TIME- configures automatic logoff timeREAD_ONLY_API- enables/disables read-only API modeAcceptNonBrokerageAccountWarning=yes- accepts paper trading warningProposed Solution
Add similar automatic configuration for API logging settings by interacting with the Global Configuration → API → Settings dialog.
Suggested Environment Variables
CREATE_API_MESSAGE_LOG_FILE=true API_LOGGING_LEVEL=Detail # Options: Error, Warning, System, Notice, Incoming, Outgoing, Detail INCLUDE_MARKET_DATA_IN_API_LOG=falseHow It Would Work
IBC would:
CREATE_API_MESSAGE_LOG_FILEAPI_LOGGING_LEVELINCLUDE_MARKET_DATA_IN_API_LOGBenefits
References