Title (above)
Is there a way to limit the Log level on CLI console, when backtesting locally ? (lean backtest)
On config.json
I have added
"debugging": {
"log-level": "Error"
}
To limit only trhe errors, but nothing changed.
QUANTCONNECT COMMUNITY
Title (above)
Is there a way to limit the Log level on CLI console, when backtesting locally ? (lean backtest)
On config.json
I have added
"debugging": {
"log-level": "Error"
}
To limit only trhe errors, but nothing changed.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Mia Alissi
To limit the log level to only error messages when backtesting locally with Lean, you should ensure the following steps are correctly implemented:
Configuring
config.json
:config.json
file includes the"debugging"
section with the"log-level": "Error"
setting. It should look like this:Using
ConsoleErrorLogHandler
:ConsoleErrorLogHandler
is a subclass ofConsoleLogHandler
that only logs error messages. Ensure that your local Lean environment is configured to use this handler. This handler suppresses debug and trace messages by overriding thedebug
andtrace
methods to do nothing.Lean Environment Configuration:
config.json
settings. If there are any custom logging configurations or handlers, they might override these settings.Restart Lean Environment:
config.json
, restart your local Lean environment to apply the new settings.Check for Overrides:
config.json
settings. Ensure no other logging handlers are being used that could affect the logging level.Testing:
By following these steps, you should be able to limit the log output to only error messages during local backtesting with Lean. If you continue to encounter issues, consider consulting the Lean documentation or community forums for further troubleshooting specific to your setup.
Sources: Debugging Tools - QuantConnect.com, Debugging - QuantConnect.com, Logging - QuantConnect.com
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Perfxtra
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!