Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Log file updating
Collapse
X
-
I am used to the log file being updated regularly during trading, but that does not seem to be happening in one of my installations.Originally posted by NinjaTrader_ChelseaB View PostHello Atomic,
Start up information, connection information, order information, and error information are all written to the log.
These are used for the NinjaTrader staff to diagnose user issues.
Is there a specific error you would like assistance with?
Comment
-
Hello Atomic,
The log messages are appearing on the Log tab of the Control Center, but the same messages are not being written to the log file?
This may indicate an issue with permissions (or antivirus) preventing NinjaTrader from writing to the disc, however this will typically cause NinjaTrader to crash outright.Chelsea B.NinjaTrader Customer Service
Comment
-
I am still having problems with this. When I want to access the data in these files from another application, the first thing I do is have a batch file copy the log file to another folder. Unfortunately, that process does not work on Windows 2019 server, but it does seem to work on Windows11. Just now, I went to the server and looked at the log files for today. There were two files, but they both showed the size as zero. If I clicked on either one of them, they would net get their file attributes updated, and I could copy them to another folder. Snips attached. The top image is when I first viewed the files, and the second is after I clicked on one of them. After clicking on the file, I could then copy it with a batch file (using robocopy and xcopy). I do not see this same behavior on Windows 11.
Comment
-
Hello Atomic,
This may be an issue with the windows installation on this computer.
Have you spoken about this issue with a computer repair specialist?
Are you attempting to diagnose an issue you are having?
If so, you can add the log and trace folders to a compressed .zip file and email these to support [at] ninjatrader [dot] com and you don't have to copy these.Chelsea B.NinjaTrader Customer Service
Comment
-
if file size is 0kb, that file is probably opened and locked by NT, and that could prevent robo and x from accessing it for a copy operation.
You might want to investigate how to use Volume Shadow Copy in a powershell script to acces the lcoked file and make a copy of it.
Or you could just be writing your own log file using StreamWriter, and have your 3rd party app access that file. Flush the buffer often to write to the file.
Comment
-
This is on a Windows 2019 server. I never see this on a Windows 10 or 11 desktop.Originally posted by NinjaTrader_ChelseaB View PostHello Atomic,
This may be an issue with the windows installation on this computer.
Have you spoken about this issue with a computer repair specialist?
Are you attempting to diagnose an issue you are having?
If so, you can add the log and trace folders to a compressed .zip file and email these to support [at] ninjatrader [dot] com and you don't have to copy these.
Comment
-
I thought his only happened on the server, but I was mistaken. It also happens on a Windows desktop. What I see is that the file attributes are not set until I click on the file. Another application that depends on a file attribute (size) will not do anything unless the file is larger than some minimum size. Shouldn't the fie attributes get updated whenever the file is written to? For instance, if I create a file using Notepad, and then edit the file so as to increase the file size, I can see the file size update in file explorer without my doing anything other than saving the file from Notepad.Last edited by Atomic; 10-13-2023, 11:45 AM.
Comment
-
I am reading the file with another application, and I do this by using a .bat files which use robocopy and xcopy. I copy the file to another folder so that I will not be reading the file while the Ninjatrader platform is trying to write to it. Because there may be more than one of the files (in the case the platform is restarted during the day), my robocopy command has a file size requirement (I only want to copy the largest file). What I see is that whether it's Windows 11 or a Windows server, is that the file attribute does not seem to change unless I click on it. In other words, if I open file explorer and navigate to the folder where the log file is, its size will show as zero until I click on the file. I assume this means that robocopy sees a file size of zero, so the file is not copied. It makes me wonder if Ninjatrader is keeping the file open after a write operation.Originally posted by NinjaTrader_ChelseaB View PostHello Atomic,
Unfortunately, I wouldn't know the specifics about how the windows operating system views files as they are being modified.
The file is being updated correctly? (If you submit an order can you see the order in the Log?)
Just now, I did a test. I opened the platform and the log files showed zero size in file explorer. When I closed the platform, the file size changed automatically. This makes me thing that the way the platform writes to this file causes the file attributes to not be updated automatically.Last edited by Atomic; 10-15-2023, 06:34 AM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
72 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
44 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
25 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
29 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
60 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment