Skip to content
/ Log4mql Public

Log4mql is a mql4 (MetaQuotes MetaTrader 4 Language) library for flexible logging to files and the terminal console. It is modeled after the Log4j Java library, staying as close to their API as is reasonable.

License

Notifications You must be signed in to change notification settings

mql4j/Log4mql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

log4mql

Log4mql is a mql4 (MetaQuotes MetaTrader 4 Language) library for flexible logging to files and the terminal console. It is modeled after the Log4j Java library.

Usage in your code


CLog4mql::getInstance().error(__FILE__, __LINE__, "Something unexpected happen");

  or (for more frequent usage)

CLog4mql* logger = CLog4mql::getInstance();
logger.error(__FILE__, __LINE__, "Something unexpected happen");
logger.info(__FILE__, __LINE__, "Calcumation done");
logger.debug(__FILE__, __LINE__, StringFormat("The result of %s is %d", string1, value1));

Dont forget at the end of your EA / Indicator / Script:


CLog4mql::release();

  or

logger.release();

Directories

The directory for the log4mql.conf and the log4mql.log files

  • Normal mode: <mt4-data-dir>/MQL4/Files/
  • Test mode: <mt4-data-dir>/tester/files/

Log Levels

You can configure the required log level for output in the configfile for each appending file and / or a global default.

  • TRACE
  • DEBUG
  • INFO
  • WARN
  • ERROR
  • CRIT

About

Log4mql is a mql4 (MetaQuotes MetaTrader 4 Language) library for flexible logging to files and the terminal console. It is modeled after the Log4j Java library, staying as close to their API as is reasonable.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages