Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

FileLog - MetaTrader 4 Library | MT4 EA Download - MetaTrader 4 Resources

author EAcpu | 2 reads | 0 comments |

FileLog - library for MetaTrader 4

FileLog - library for MetaTrader 4

FileLog is a simple MQL4 class for flexible logging to files and terminal console.

Github repository: https://github.com/RGunning/MQL4Logger

Log files will be saved at:

 CFileLog* logger = new CFileLog(" example.log ", warning, true );

Logger.Error( String format ("%s %d %s", __file__ , __line__ , "Something unexpected happened"));
logger.info( string format ("%s %d %s", __file__ , __line__ , "Complete calculation"));
Logger.Debug( String format ("%s %d The result of %s is %d", __file__ , __line__ , string1, value1));

Don't forget at the end of your EA/indicator/script:

 delete logger;

Log level:

A working example of the logger can be viewed in FileLogExample.mq4.

FileLog - library for MetaTrader 4

FileLog - library for MetaTrader 4


Attachment download

📎 filelog.mqh (9.53 KB)

📎 filelogexample.mq4 (2.05 KB)

Source: MQL5 #18465

Verification code Refresh