有一个Web端是用Foxtable写的,18日之前用一直没什么问题,19日升级成Foxtable 2021后,服务器上的程序莫名退出, 退出后在任务管理器中找不到,手机端无法工作。几乎每天都会发生。
在记录错误的Log文件里也没发现问题。
这种问题很难查,但2020就没有问题。如有可能看一下原因。
LogText的代码如下:
Dim v
= Args(0)
Dim bu As new StringBuilder
bu.AppendLine(Format(
Date.Now,"yyyy-MM-dd HH:mm:ss.ffff")) '记录出错时间
If Args.length > 1 Then
bu.AppendLine("事件/函数: " & Args(1)) '记录出错的事件或者函数
End If
If Typeof v Is Exception Then '如果是Exception的异常类型,则递归获取所有的异常堆栈
Do
While v IsNot Nothing
bu.AppendLine( v.Message & vbcrlf & v.StackTrace)
v
= v.InnerException
Loop
Else '其它情况只能传入错误的文本内容
bu.AppendLine(v)
End If
Output.Logs("AppLogging").Add(bu.ToString)
Output.Logs("AppLogging").Save(ProjectPath & "Mmsglog.txt",True) '日志位于当前项目目录里
Output.Logs("AppLogging").Clear