Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ CLog4mql::release();
logger.release();
</code></pre>

## Filename
You can set dynamically the file name of log with:
<pre><code>
const string typeLog=(IsDemo()?"demo":"real";
logger.setConfLogFile(StringFormat("log4mql-%s-%s.log",typeLog,Symbol()));
</code></pre>

## Directories
The directory for the log4mql.conf and the log4mql.log files
* Normal mode: `<mt4-data-dir>/MQL4/Files/`
Expand Down
8 changes: 8 additions & 0 deletions log4mql.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ public:
instance = NULL;
}

static void setConfLogFile(string logFile)
{
if(instance!=NULL) {
instance.confLogFile=logFile;
instance.closeLogFile();
}
}

public:
/**
* Trace
Expand Down