syncing to debug level.

This commit is contained in:
2026-06-30 08:54:45 +02:00
parent ea9500c9fb
commit 07cf44a098
+12 -7
View File
@@ -88,15 +88,14 @@
(when (eq? logger-thread #f) (when (eq? logger-thread #f)
(set! logger-thread (set! logger-thread
(thread (thread
(λ () (let loop () (λ () (let loop ((v (sync log-queue)))
(let* ((v (sync log-queue))
(level (vector-ref v 0)) (let* ((level (vector-ref v 0))
(msg (vector-ref v 1)) (msg (vector-ref v 1))
(data (vector-ref v 2)) (data (vector-ref v 2))
(dt (car data)) (dt (car data))
(topic (cadr data)) (topic (cadr data))
(lc log-callbacks) (lc log-callbacks))
)
(when (string=? msg "@@SYNC@@") (when (string=? msg "@@SYNC@@")
(let ((sem (hash-ref sync-sems topic #f))) (let ((sem (hash-ref sync-sems topic #f)))
@@ -107,7 +106,7 @@
(begin (begin
(semaphore-post sem) (semaphore-post sem)
(set! msg (format "Synchronization received on topic ~a" topic)) (set! msg (format "Synchronization received on topic ~a" topic))
(set! level 'info) (set! level 'debug)
) )
))) )))
@@ -136,8 +135,14 @@
lc)) lc))
) )
) )
)
(loop)))) (loop (let ((a (async-channel-try-get log-queue)))
(if (eq? a #f)
(sync log-queue)
a)))
)
)
#:pool 'own #:pool 'own
) )
) )