[Git][NTPsec/ntpsec][master] Updated the output to be space seperated instead of comma seperated

deamoneye gitlab at mg.gitlab.com
Sat Jan 21 04:45:16 UTC 2017


deamoneye pushed to branch master at NTPsec / ntpsec


Commits:
b06b42b4 by Keane Wolter at 2017-01-20T23:45:06-05:00
Updated the output to be space seperated instead of comma seperated

- - - - -


1 changed file:

- contrib/temp-log.py


Changes:

=====================================
contrib/temp-log.py
=====================================
--- a/contrib/temp-log.py
+++ b/contrib/temp-log.py
@@ -42,7 +42,7 @@ class CpuTemp:
             if match and match.group(1):
                 _now = int(time.time())
                 _cpu_temprature = match.group(1)
-                _data.append('{},{},{}'.format(_now, _index, _cpu_temprature))
+                _data.append('%d %s %s' % (_now, _index, _cpu_temprature))
                 _index += 1
 
         return _data
@@ -73,7 +73,7 @@ class SmartCtl:
                 now = int(time.time())
                 if match and match.group(1):
                     temp = match.group(1)
-                    return ('%d,%s,%s' % (now, _device, temp))
+                    return ('%d %s %s' % (now, _device, temp))
 
 
 class ZoneTemp:
@@ -95,7 +95,7 @@ class ZoneTemp:
             for line in _zone_data:
                 temp = float(line) / 1000
                 _now = int(time.time())
-                _data.append('{},{},{}'.format(_now, _zone, temp))
+                _data.append('%d %s %s' % (_now, _zone, temp))
                 _zone = _zone+1
             _zone_data.close()
         return _data
@@ -104,7 +104,7 @@ class ZoneTemp:
 def logging_setup(fileName, levelName, logLevel):
     "Create logging object"
     logFormat = logging.Formatter(
-        '%(asctime)s,%(name)s,%(levelname)s,%(message)s')
+        '%(asctime)s %(name)s %(levelname)s %(message)s')
     # Create logger for cpuTemp
     tempLogger = logging.getLogger(levelName)
     tempLogger.setLevel(logLevel)
@@ -127,7 +127,7 @@ def logging_setup(fileName, levelName, logLevel):
 def console_log_setup(levelName, logLevel):
     "Create logging object that writes to STDOUT"
     logFormat = logging.Formatter(
-        '%(asctime)s,%(name)s,%(levelname)s,%(message)s')
+        '%(asctime)s %(name)s %(levelname)s %(message)s')
     # Create the logging object
     tempLog = logging.getLogger(levelName)
     tempLog.setLevel(logLevel)



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/b06b42b4942ca48e3c0fc7aeecdefe2ecbeb6cc9
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170121/f138fcad/attachment.html>


More information about the vc mailing list