Cloud Logging vs Backtesting Logging, Incorrect Order of Logs
Cloud Logging vs Backtesting Logging, Incorrect Order of Logs
09 Mar 2025, 15:11
I've noticed that logs generated by robot.Print()
in the cloud instance don't appear in the same order as the backtesting log. See images below where I have marked with a number the code order of these logs. For example #1's robot.Print()
is called first and then #2's robot.Print()
is called second and so on.

Observations:
- New logs in the cloud instance appear from the top compared to a traditional log, why?
- Various logs are printed at the same time
09/03/2025 14:22:01.733
, this is caused by several sequentialrobot.Print()
calls inside a method calledPrintTradeLogs()
- Logs printed at the same time are in a race condition (#2,3,4 and 5).
Problem:
- Messy logs and hard to debug/analysis.
Has anyone encountered this issue or have a solution?
UPDATE:
I have solved this issue by queuing up logs Queue<>
and by printing one log every second with robot.Timer
.This solution allowed each cloud log to have a unique timestamp and thus correct order.
Kyle
Replies
kylej.ukr
11 Mar 2025, 09:14
( Updated at: 11 Mar 2025, 12:53 )
RE: Cloud Logging vs Backtesting Logging, Incorrect Order of Logs
firemyst said:
Have you tried clicking on the date/time column for the cloud logs to see if they can be sorted in ascending or descending order? I don't use the cloud, so I don't know if it's possible, but could be something to try?
Yes I have. It doesn't do any sorting on the desktop application when you click the columns etc.
I have found a solution and updated my post. Thanks for your reply :)
@kylej.ukr
firemyst
11 Mar 2025, 01:15
Have you tried clicking on the date/time column for the cloud logs to see if they can be sorted in ascending or descending order? I don't use the cloud, so I don't know if it's possible, but could be something to try?
@firemyst