Disconnect USB cable cause loop in log writting
maxcharlier opened this issue · 3 comments
Hi,
I use adrilight on windows 10 for 1 month now. I have note that my hard drive was completely full recently and I found that was cause by adrilight.
If I run adrilight without the USB connected to the Arduino the app start to make a loop with a message writed in the logs files.
Here is the message :
2017-08-10 19:46:27.7252 DEBUG adrilight.SerialStream Exception catched. System.IO.IOException: Le port 'COM3' n'existe pas.
a System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
a System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace)
a System.IO.Ports.SerialPort.Open()
a adrilight.SerialStream.mBackgroundWorker_DoWork(Object tokenObject)
I have about 300 go of files in the log folder... can you add an option to remove the log activity ?
I am curious, did you unplug your USB connection to your arduino and left it like that?
There is no way, the log file fills up AND adrilight working correctly.
The log creates one log file per day and keeps the last 7 days. This is configured in the nlog.config file.
You may simply replace (line 24 in your nlog.config):
from
<logger name="*" minlevel="Debug" writeTo="file" />
to
<logger name="*" minlevel="Fatal" writeTo="file" />
This will change the logging to not log really much anymore.
I had exactly the same problem.
My toddler keeps on unplugging the arduino from the PC. And after a month my PC was saturated with log files (50Gb)
I erased it and everything was ok but it took me a while to figure out that Adrilight was causing this.
I'm glad someone will address this problem.
Keep up the good work !