changeset 2107:8bb2f526d457

logging
author drewp@bigasterisk.com
date Wed, 01 Jun 2022 17:00:29 -0700
parents 9eb2e7c40765
children e92db17f3e7e
files light9/collector/service.py light9/effect/sequencer/sequencer.py light9/effect/sequencer/service.py light9/fade/web/Light9FadeUi.ts
diffstat 4 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/light9/collector/service.py	Wed Jun 01 12:21:06 2022 -0700
+++ b/light9/collector/service.py	Wed Jun 01 17:00:29 2022 -0700
@@ -7,6 +7,7 @@
 Input can be over http or zmq.
 """
 import functools
+import logging
 import traceback
 from typing import List
 
@@ -62,6 +63,9 @@
 
 
 def main():
+    logging.getLogger('autodepgraphapi').setLevel(logging.INFO)
+    logging.getLogger('syncedgraph').setLevel(logging.INFO)
+
     graph = SyncedGraph(networking.rdfdb.url, "collector")
 
     try:
--- a/light9/effect/sequencer/sequencer.py	Wed Jun 01 12:21:06 2022 -0700
+++ b/light9/effect/sequencer/sequencer.py	Wed Jun 01 17:00:29 2022 -0700
@@ -148,7 +148,7 @@
 
 
 class Sequencer(object):
-
+    """Notes from the graph + current song playback -> sendToCollector"""
     def __init__(self,
                  graph: SyncedGraph,
                  sendToCollector: Callable[[DeviceSettings], Coroutine[None ,None,None]],
@@ -201,7 +201,7 @@
                 continue
             self.notes[song].append(n)
         if not anyErrors:
-            log.info('built all notes')
+            log.info(f'built all notes for {song}')
 
     async def updateLoop(self):
         while True:
--- a/light9/effect/sequencer/service.py	Wed Jun 01 12:21:06 2022 -0700
+++ b/light9/effect/sequencer/service.py	Wed Jun 01 17:00:29 2022 -0700
@@ -11,7 +11,7 @@
 from light9.collector.collector_client_asyncio import sendToCollector
 from light9.effect.sequencer.sequencer import StateUpdate, Sequencer
 from light9.effect.settings import DeviceSettings
-from light9.metrics import metrics, metricsRoute
+from light9.metrics import metrics
 from light9.run_local import log
 from louie import dispatcher
 from rdfdb.syncedgraph.syncedgraph import SyncedGraph
@@ -49,6 +49,7 @@
     session = 'effectSequencer'
     graph = SyncedGraph(networking.rdfdb.url, "effectSequencer")
     logging.getLogger('autodepgraphapi').setLevel(logging.INFO)
+    logging.getLogger('syncedgraph').setLevel(logging.INFO)
     logging.getLogger('sse_starlette.sse').setLevel(logging.INFO)
 
     async def send(settings: DeviceSettings):
--- a/light9/fade/web/Light9FadeUi.ts	Wed Jun 01 12:21:06 2022 -0700
+++ b/light9/fade/web/Light9FadeUi.ts	Wed Jun 01 17:00:29 2022 -0700
@@ -103,14 +103,18 @@
     });
   }
   configure() {
+    //   console.time(`fader configure ${this.uri.value}`)
     const U = this.graph.U();
     this.column = this.graph.stringValue(this.uri, U(":column"));
     this.effect = this.graph.uriValue(this.uri, U(":effectClass"));
     this.effectAttr = this.graph.uriValue(this.uri, U(":effectAttr"));
+    // console.timeEnd(`fader configure ${this.uri.value}`)
   }
 valueSync() {
+    // console.time(`valueSync ${this.uri.value}`)
     this.value = this.graph.floatValue(this.uri, this.graph.Uri(":value"));
 }
+    // console.timeEnd(`valueSync ${this.uri.value}`)
   onSliderInput(ev: CustomEvent) {
     this.value = (ev.target as any).valueAsNumber;
     this.graph.patchObject(this.uri, this.graph.Uri(":value"), this.graph.LiteralRoundedFloat(this.value), this.ctx);