diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..600d2d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode \ No newline at end of file diff --git a/README.md b/README.md index 0e46dd3..d0b680f 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,13 @@ CLog4mql::release(); logger.release(); +## Filename +You can set dynamically the file name of log with: +

+const string typeLog=(IsDemo()?"demo":"real";
+logger.setConfLogFile(StringFormat("log4mql-%s-%s.log",typeLog,Symbol()));
+
+ ## Directories The directory for the log4mql.conf and the log4mql.log files * Normal mode: `/MQL4/Files/` diff --git a/log4mql.mqh b/log4mql.mqh index 322bedb..49ebd50 100644 --- a/log4mql.mqh +++ b/log4mql.mqh @@ -147,6 +147,14 @@ public: instance = NULL; } + static void setConfLogFile(string logFile) + { + if(instance!=NULL) { + instance.confLogFile=logFile; + instance.closeLogFile(); + } + } + public: /** * Trace