SmarterMail 16 Ignoring Log File Location
Problem reported by Bruce - January 5, 2018 at 4:11 AM
I have log files set to S:\Logs but some smartermail logs ignore this and place the logis in;
C:\Program Files (x86)\SmarterTools\SmarterMail\MRS\App_Data\Logs
Logs that ignore this settinsg are;
SignalRLog 2018.01.05.txt

8 Replies

Reply to Thread
Alex Clarke Replied
I've noticed this bug too and have reported it to SM.

We have over 340GB of logs in this folder, which would compress down to less than 1GB if the logs were being written to the correct folder!
Bruce Replied
I reported also to SM but was told that these are logs specifically relating to the SmarterMail web interface and con not be moved.

The problem is that even setting them to exception only they are getting to be nearly 50 GB a month and as they are on the c drive and can not be moved to have manually delete the logs.

Really need for SM to allow them to be moved or reduce the size of these logs.
Alex Clarke Replied
Maybe using a symlink will allow us to relocate the log files.

I'll test this out when I get a chance!

If they can't be moved then ST should make sure that the auto compression and deletion of logs files is also applied to this folder too.
Bruce Replied
I am sure I tried a symlink and it did not work. Could be wrong though as it was nearly a year ago that I looked in to this and contacted SM support.
Alex Clarke Replied
So, I'm revisiting this since upgrading to v17.

Now I'm seeing the following logs being written to the  C:\Program Files (x86)\SmarterTools\SmarterMail\MRS\App_Data\Logs folder.

DebugLog 2019.07.10.txt
SignalRLog 2019.07.10.txt
ErrorLog 2019.07.10.txt

Some of the other files, previously reported, are now being written to my correct log directory (S:\Logs).

It's possible to copy historical log files that are now being written to the correct folder (i.e. EWSLog 2019.01.12.txt) and this doesn't break searching the logs within the web interface.

However, the auto-compression of these log files doesn't work anymore. This appears to be caused by the name format of certain files being changed.

Taking the EWS log as an example, I have 300+ log files (over 340GB) in the C:\Program Files (x86)\SmarterTools\SmarterMail\MRS\App_Data\Logs folder. The format of the filenames is EWSLog 2019.01.12.txt, but SM is now writting these files to the correct logs folder and naming them like 2019.07.10-ews.log.

So, I copied all of these old EWS log files to my correct log directory and then ran the following Powershell script, which renamed all the files for me.

Get-ChildItem "S:\Logs\EWSLog*" | Foreach { Rename-Item $_ ($_.Name -replace "EWSLog ", "" -replace ".txt", "-ews.log") }
Now these new files will be compressed when the daily maintenance task runs!
Ionel Aurelian Rau Replied

I do not understand why we would have to work out scripts and solutions ourselves for this - is it impossible for SM to write all logs to a designated folder configured in the web interface?

We have most logs being written to the correct folder (what we configured), but some are still written in DRIVE:\Program Files (x86)\SmarterTools\SmarterMail\MRS\App_Data\Logs, including very large YYYY.MM.DD-bosh-xmpp.log files written there daily (this is not our configured location).
Alex Clarke Replied
I recall someone mentioning that the logs within the C:\Program Files (x86)\SmarterTools\SmarterMail\MRS\App_Data\Logs folder had to be stored there as they are written by a particular process.

Ideally, these logs should be located within the custom log path that you can set with SM.

At a minimum, ST need to ensure that the log auto-compression rules apply to these files too - just like they do with the Message Sniffer logs (which are stored in C:\Program Files (x86)\SmarterTools\SmarterMail\Service\SNF).
I agree.  We have SmarterMail domains & log data stored on a D: drive.  I expect a program to be as self contained as possible, not having crap scattered all over the place.  So when i say "put it on Drive D:"  I mean everything. ALL data, not bits and pieces. For me, this would ideally even include all of the configuration data.   oh.. you want reliable backups ?  "yea, sorry, only got partial backup because you did not specify the 99x locations of where we scattered the data at. and now its gona take you 6 hours to get smarter mail back up and running"  

Ideally i would like to be able to take smartermail, install it, and have all of the data, confugration, etc, etc... everything - at a location we specify.  Then, for an upgrade, restoring a backup, repair or to move it to a new server, just zip up the data, install smarter mail at the new location, drop the data, unzip, point smarter mail to the data location, press start, and it is fully functional again.  Self contained data bundle. - Providing technology services to non profit organizations, homeless shelters, clean and sober houses and prisoner reentry programs. in 2018, in just one year, we gave away 1,000 Free Computers !

Reply to Thread