Discussion of article "Finding Errors and Logging"

 

New article Finding Errors and Logging is published:

MetaEditor 5 has the debugging feature. But when you write your MQL5 programs, you often want to display not the individual values, but all messages that appear during testing and online work. When the log file contents have large size, it is obvious to automate quick and easy retrieval of required message. In this article we will consider ways of finding errors in MQL5 programs and methods of logging. Also we will simplify logging into files and will get to know a simple program LogMon for comfortable viewing of logs.

Author: Дмитрий Александрович

 

The attached .exe is still in Russian language. Can you please re-up it?

P.S. This is really useful! One of the first classes that should be declared in any OOP project is one to handle errors!

 
Thank you for your comment. Now you can find correct English version of this utility in attached files.
 

If you forget to use flush, data loss may occur.

 A better solution would be the following:


private:
   void              flush(void);              // Flushing cache into file
//+------------------------------------------------------------------+
//|   Deinitialization                                               |
//+------------------------------------------------------------------+
void CLogger::deinit(void)
  {
   flush();  // Flush data
   FileClose(handleFile); // Close file
  }

So that the data save is automatically.

 

ps.: I'm sorry if I offended spelling, the google translator helped me...

Reason: