Where are the log files when using the new MQL4's Print() function?

 

Hi there,

MQL5's Finding Errors and Logging says: "all messages are written without notifications into the "Experts" tab and into the "Terminal_dir\MQL5\Logs\data.txt" file".

Everything's ok in MQL5. However, when using the Print function in my new MQL4 fresh copy, I don't get any log file...

Any tip is welcome, thank you in advance.

 
laplacianlab:

Hi there,

MQL5's Finding Errors and Logging says: "all messages are written without notifications into the "Experts" tab and into the "Terminal_dir\MQL5\Logs\data.txt" file".

Everything's ok in MQL5. However, when using the Print function in my new MQL4 fresh copy, I don't get any log file...

Any tip is welcome, thank you in advance.

Look in the MQL4\Logs folder . . .
 
RaptorUK:
Look in the MQL4\Logs folder . . .


Thanks a lot, I looked there already, of course, but there is no file.

I'm just using the Print function in a fresh MQL4 download.
Everything's ok but the log file seems to be missing.
 
laplacianlab:

Thanks a lot, I looked there already, of course, but there is no file.

I'm just using the Print function in a fresh MQL4 download.
Everything's ok but the log file seems to be missing.
OK, either right click in the Experts tab window and click Open . . . or . . click File > Open Data Folder then from there open the Logs folder.
 
RaptorUK:
OK, either right click in the Experts tab window and click Open . . . or . . click File > Open Data Folder then from there open the Logs folder.

My own experience is that the log file in MQL4\logs is not necessarily written immediately. It seems that you can have output visible on screen which is not yet committed to disk. For example, I've just done the following test: start MT4 v604; run a script which does Print(); nothing in MQL4\logs; shut down MT4; log is written on shutdown.

I haven't investigated what the delay or write-threshold is between doing Print() and having something appear on disk. But it no longer seems to be immediate - which I can't say that I like. If MT4 terminates abnormally - e.g. terminated using Task Manager - then it seems that some Print() output can get lost.

 
gchrmt4:

My own experience is that the log file in MQL4\logs is not necessarily written immediately. It seems that you can have output visible on screen which is not yet committed to disk. For example, I've just done the following test: start MT4 v604; run a script which does Print(); nothing in MQL4\logs; shut down MT4; log is written on shutdown.

I haven't investigated what the delay or write-threshold is between doing Print() and having something appear on disk. But it no longer seems to be immediate - which I can't say that I like.

This was also the case with the "old" MT4, some users reported that output to the file was delayed, it was also reported that opening from a right click the Experts tab pane would flush the file.
 
RaptorUK:
This was also the case with the "old" MT4, some users reported that output to the file was delayed, it was also reported that opening from a right click the Experts tab pane would flush the file.
... if you say so. I've never seen that myself, and I can't replicate it in v509.
 

Sorry for opening this thread..

I was not looking well. I have many MQL instances.

On the one hand, I can access my log file by browsing my file system and going to Roaming/MetaQuotes/Terminal/mql_instance/tester/logs/

On the other hand, as you say now, I can also access the log file by right-clicking MQL4's Navigator Log folder.

Everything's ok, thks

 
laplacianlab:


Everything's ok, thks

Glad to hear it, you are most welcome
 
RaptorUK:
This was also the case with the "old" MT4, some users reported that output to the file was delayed, it was also reported that opening from a right click the Experts tab pane would flush the file.


Yes, it seems to be a delay or something.. I don't know.

Anyway, you can access the log file almost instantaneously and directly from the filesystem -> Roaming/MetaQuotes/Terminal/mql_instance/tester/logs/

 
gchrmt4:
... if you say so. I've never seen that myself, and I can't replicate it in v509.
(I have seen this in backtesting but, until the most recent post from laplacianlab, this topic seemed to be about live results in MQL4\Logs, not backtesting results in tester\logs.)
Reason: