# HG changeset patch # User drewp@bigasterisk.com # Date 2018-06-08 05:40:02 # Node ID 6b101309fb12bc7b5453a42561daccd275f47f49 # Parent 626a798910611d07c454c412cf545e0969af1bc1 collector logging Ignore-this: b6ed23697ded6a40151ff0cca98b334 diff --git a/bin/collector b/bin/collector --- a/bin/collector +++ b/bin/collector @@ -66,7 +66,7 @@ class WebListeners(object): def addClient(self, client): self.clients.append([client, {}]) # seen = {dev: attrs} - log.info('added client %s', client) + log.info('added client %s %s', len(clients), client) def delClient(self, client): self.clients = [[c, t] for c, t in self.clients if c != client] diff --git a/light9/collector/output.py b/light9/collector/output.py --- a/light9/collector/output.py +++ b/light9/collector/output.py @@ -135,6 +135,7 @@ class Udmx(DmxOutput): scales.IntStat('usbErrors')) def __init__(self, uri, bus, numChannels): DmxOutput.__init__(self, uri, numChannels) + self._shortId = self.uri.rstrip('/')[-1] from light9.io.udmx import Udmx self.dev = Udmx(bus) @@ -155,7 +156,7 @@ class Udmx(DmxOutput): def update(self, values): now = time.time() if now > self.lastLog + 1: - log.info('udmx %s', ' '.join(map(str, values))) + log.info('%s %s', self.shortId(), ' '.join(map(str, values))) self.lastLog = now self.currentBuffer = ''.join(map(chr, values)) @@ -174,5 +175,5 @@ class Udmx(DmxOutput): Udmx.stats.usbErrors += 1 def shortId(self): - return 'udmx' # and something unique from self.dev? + return self._shortId