Back

How to increase log file size?

Is there any way I can increase the max size of an algo's log file? Or, ask the QuantConnect servers to use a rolling log file, so that if the max file size is reached the server will overwrite the file starting at the beginning?
Update Backtest








Hey Mike, we increase it to 100kb when you get a subscription (or brokerage covers your subscription). If you're looking for a circular log the best way is probably OnEndOfAlgorithm virtual method.

List _logs = new List();
public override void OnEndOfAlgorithm()
{
foreach(string msg in _logs.Reverse().Take(100)) Log(msg);
}
1

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.


Ok, thanks Jared! I'll try what you've suggested I have it on my list to sign up for a pro account soon.
0

I implemented the following, but nothing is outputted.

List _logs = new List();
_logs.Add("line 1");
// ...
_logs.Add("line 150");
public void OnEndOfAlgorithm()
{
Debug("OnEndOfAlgorithm() called.");
_logs.Reverse();
_logs = (List)_logs.Take(10);
foreach(string line in _logs)
{
Debug(line);
}
}
0

Please disregard my last post. In my sleep deprived state, I must have not noticed the obvious problems in it. :-)
0

Just to confirm, was an error message sent back to your IDE about the invalid cast?
0

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.


Yes it was. I meant to update this post stating, I changed it to

public override void OnEndOfAlgortihm()

And it works now. I have another problem with it, but it's due to the way _logs.Take() is being called. I'll sort through it. For now, it's a lower priority for me.
0

Update Backtest





0

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.


Loading...

This discussion is closed