The logfile is written without newlines between the records, proposed patch:
diff --git a/Gurux.DLMS.Client.Example.python/GXDLMSReader.py b/Gurux.DLMS.Client.Example.python/GXDLMSReader.py
index a339d47..30d9562 100644
--- a/Gurux.DLMS.Client.Example.python/GXDLMSReader.py
+++ b/Gurux.DLMS.Client.Example.python/GXDLMSReader.py
@@ -110,7 +110,7 @@ class GXDLMSReader:
def writeTrace(self, line, level):
if self.trace >= level:
print(line)
- self.logFile.write(line)
+ self.logFile.write(line + "\n")
def readDLMSPacket(self, data, reply=None):
if not reply:
Hi, This is fixed.
Hi,
This is fixed.
Thanks, that was quick :-)
Thanks, that was quick :-)
One other thing: You may
One other thing: You may want to consider calling .flush() after each write, otherwise the logfile doesn't show anything until the program either terminates or has filled th 4k/16k/whatever size write bufer.
One other thing: You may
One other thing: You may want to consider calling .flush() after each write, otherwise the logfile doesn't show anything until the program either terminates or has filled th 4k/16k/whatever size write bufer.