Log4mql - MetaTrader 4 library | MT4 EA download - MetaTrader 4 resources

Log4mql is an MQL4 (MetaQuotes MetaTrader 4 Language) library for flexible logging to files and terminal console. It is modeled after the Log4j Java library.
Documentation (GitHub): https://github.com/swaypnet/Log4mql
Usage in your code:
CLog4mql::getInstance().error( __file__ , __line__ , "Something unexpected happened" );
or (for more frequent use)
CLog4mql* logger = CLog4mql::getInstance(); Logger.Error( __file__ , __line__ , "Something unexpected happened" ); Logger.info( __file__ , __line__ , "Complete calculation" ); logger.debug( __file__ , __line__ , string format ( "The result of %s is %d" , string1, value1));
Don't forget at the end of your EA/indicator/script:
CLog4mql::release();
or
Logger.release();
Table of contents:
Directory of log4mql.conf and log4mql.log files
You can configure the desired log level for the output in the configuration file for each additional file and/or the global default.

Attachment download
📎 log4mql.mqh (16.61 KB)
Source: MQL5 #13382
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •