vdemydiuk / mtapi

MetaTrader API (terminal bridge)
http://mtapi4.net/
MIT License
511 stars 276 forks source link

Update LogConfigurator.cs #259

Closed joecklau closed 2 years ago

joecklau commented 2 years ago

The part of filename "{DateTime.Now:yyyy-dd-M--HH-mm-ss}-{Process.GetCurrentProcess().Id}" generates tons of log files with same content but different per-second/thread filenames until the harddisk have 0KB space left. This kept happening in my AWS EC2 machine until I found the big GBs-size log file in temp folder caused by this line.

Changing the filename to $"{DateTime.Now:yyyy-MM-dd}.{LogFileNameExtension}" solved the issue. The timestamp and processId can still be found in the log content.

joecklau commented 2 years ago

(Replaced by pull request #260 on dev branch)