Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Missing Newlines In Logfile

Missing newlines in logfile

By bsdphk , 7 August, 2020
Project
Gurux.DLMS.Python
Status
Closed (fixed)

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:

Priority
Normal
Category
Bug report
Profile picture for user Administrator

Administrator

6 years 3 months ago

Hi, This is fixed.

Hi,

This is fixed.

Profile picture for user Administrator

Administrator

6 years 3 months ago

bsdphk

6 years 3 months ago

Thanks, that was quick :-)

Thanks, that was quick :-)

bsdphk

6 years 3 months ago

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.

bsdphk

6 years 3 months ago

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.

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Thu, 11/19/2026 - 10:57
    Gurux.DLMS.Python 1.0.204
  • Thu, 11/19/2026 - 10:12
    gurux.dlms.c 9.0.2611.1901
  • Tue, 10/13/2026 - 12:00
    gurux.dlms.java 4.0.97
  • Tue, 09/22/2026 - 14:02
    Gurux.DLMS.Net 9.0.2609.2201
  • Mon, 09/21/2026 - 10:18
    Gurux.DLMS.Net 9.0.2609.2101

New forum topics

  • Landis E650 meter reading over DLMS
  • class_id = 40, version = 2, pushsetup Unparsed data frame
  • GXObisValueItem entries without MaskSize appear to be interpreted as bit flags
  • CheckedListBox incorrectly selects GXObisValueItem Value=0 for non-zero values
  • UIValueType=TextBox is rendered as CheckedListBox when Values are defined
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin