Changes for issue #27

This commit is contained in:
Michael J. Seiferling
2016-06-09 12:37:48 -06:00
parent 7b524e42fc
commit ef6e608d30
9 changed files with 97 additions and 39 deletions
+11 -6
View File
@@ -1050,12 +1050,17 @@ Public Class frmMain
Dim d As New UpdateLogCallBack(AddressOf UpdateLog)
Me.Invoke(d, New Object() {sLogUpdate, bTrayUpdate, objIcon, bTimeStamp})
Else
'Auto save and clear the log if we are approaching the limit
If txtLog.TextLength > 16770000 Then
Dim sLogFile As String = mgrPath.LogFileLocation
mgrCommon.SaveText(txtLog.Text, sLogFile)
txtLog.Clear()
txtLog.AppendText("[" & Date.Now & "] " & mgrCommon.FormatString(frmMain_LogAutoSave, sLogFile))
'Auto save and/or clear the log if we are approaching the limit
If txtLog.TextLength > 262144 Then
If oSettings.AutoSaveLog Then
Dim sLogFile As String = mgrPath.LogFileLocation
mgrCommon.SaveText(txtLog.Text, sLogFile)
txtLog.Clear()
txtLog.AppendText("[" & Date.Now & "] " & mgrCommon.FormatString(frmMain_LogAutoSave, sLogFile))
Else
txtLog.Clear()
txtLog.AppendText("[" & Date.Now & "] " & frmMain_LogAutoClear)
End If
End If
'We shouldn't allow any one message to be greater than 255 characters if that same message is pushed to the tray icon