开源改变世界!!

禁用会话日志 #511

推推 grbl 2年前 (2023-01-27) 136次浏览
关闭
mucek4 打开了这个问题 2018 年 11 月 28 日 · 6条评论
关闭

禁用会话日志#511

mucek4 打开了这个问题 2018 年 11 月 28 日 · 6条评论

注释

禁用会话日志 #511

是否有任何选项可以禁止写入 sessionlog.txt 文件?它在系统磁盘上写入,在“打印”一张光栅图像后,它增长到 50+GB,占用了我计算机上的所有磁盘空间。

禁用会话日志 #511
所有者

您好
SessionLog 正在记录手动用户活动和程序异常。
由于用户活动受到限制(打开文件、单击此处和那里等),会话日志不应增加太多,除非程序在执行“打印”时没有出现异常。

与其禁用日志,不如了解导致如此多数据记录的原因更有用。你能复制粘贴一段你的文件吗?

禁用会话日志 #511
作者

行。我会。我刚刚删除了文件,现在它是空的。当它再次变得“大”时,我会粘贴它。

禁用会话日志 #511
作者
mucek4 评论了 2018 年 11 月 29 日  

行。这是日志部分:
日志每秒包含大约 5200 行。我发现如果我在仍然连接的情况下拔下激光器,程序就会开始写入这个疯狂的日志文件。

28.11.2018 22:02:53	SendImmediate	
28.11.2018 22:02:53	SendImmediate	   at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
28.11.2018 22:02:53	SendImmediate	   at System.IO.Ports.SerialStream.BeginWriteCore(Byte[] array, Int32 offset, Int32 numBytes, AsyncCallback userCallback, Object stateObject)
28.11.2018 22:02:53	SendImmediate	   at System.IO.Ports.SerialStream.Write(Byte[] array, Int32 offset, Int32 count, Int32 timeout)
28.11.2018 22:02:53	SendImmediate	   at System.IO.Ports.SerialPort.Write(Byte[] buffer, Int32 offset, Int32 count)
28.11.2018 22:02:53	SendImmediate	   at LaserGRBL.ComWrapper.UsbSerial.Write(Byte b)
28.11.2018 22:02:53	SendImmediate	   at LaserGRBL.GrblCore.SendImmediate(Byte b, Boolean mute)
28.11.2018 22:02:53	CloseCom    	System.IO.IOException: The device does not recognize the command.
28.11.2018 22:02:53	CloseCom    	
28.11.2018 22:02:53	CloseCom    	   at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
28.11.2018 22:02:53	CloseCom    	   at System.IO.Ports.SerialStream.DiscardOutBuffer()
28.11.2018 22:02:53	CloseCom    	   at LaserGRBL.ComWrapper.UsbSerial.Close(Boolean auto)
28.11.2018 22:02:53	CloseCom    	   at LaserGRBL.GrblCore.CloseCom(Boolean user)
28.11.2018 22:02:53	CloseCom    	Close COM5 [CORE]
28.11.2018 22:02:53	CloseCom    	System.IO.IOException: The device does not recognize the command.
28.11.2018 22:02:53	CloseCom    	
28.11.2018 22:02:53	CloseCom    	   at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
28.11.2018 22:02:53	CloseCom    	   at System.IO.Ports.SerialStream.DiscardOutBuffer()
28.11.2018 22:02:53	CloseCom    	   at LaserGRBL.ComWrapper.UsbSerial.Close(Boolean auto)
28.11.2018 22:02:53	CloseCom    	   at LaserGRBL.GrblCore.CloseCom(Boolean user)
28.11.2018 22:02:53	CloseCom    	Close COM5 [CORE]
28.11.2018 22:02:53	CloseCom    	System.IO.IOException: The device does not recognize the command.
28.11.2018 22:02:53	CloseCom    	
28.11.2018 22:02:53	CloseCom    	   at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
28.11.2018 22:02:53	CloseCom    	   at System.IO.Ports.SerialStream.DiscardOutBuffer()
28.11.2018 22:02:53	CloseCom    	   at LaserGRBL.ComWrapper.UsbSerial.Close(Boolean auto)
28.11.2018 22:02:53	CloseCom    	   at LaserGRBL.GrblCore.CloseCom(Boolean user)
28.11.2018 22:02:53	CloseCom    	Close COM5 [CORE]
28.11.2018 22:02:53	CloseCom    	System.IO.IOException: The device does not recognize the command.
arkypita 添加了引用此问题的提交 2018 年 11 月 29 日

禁用会话日志 #511
所有者

我的印象是通信线程试图关闭串行端口但不能(由于您的硬件中对 DiscardOutBuffer() 的支持失败)然后串行端口保持打开状态然后线程再次尝试,连续, 关闭它。

我将在下一个版本中修复,对 DiscardOutBuffer 进行故障安全调用

禁用会话日志 #511
所有者

固定在 v3.0.4 让我知道