Use begin/dataflow to log allocated ports and statevecs

This commit is contained in:
Tony Garnock-Jones 2016-07-17 12:51:19 -04:00
parent e0f3650989
commit e1ddeb5f90
2 changed files with 6 additions and 5 deletions

View File

@ -18,8 +18,8 @@
(define local-ips (query-local-ip-addresses))
(define used-ports (query-used-ports))
;; TODO: How can I get this to run whenever used-ports changes?
;; (log-info "port-allocator ~v used ports: ~v" allocator-type new-used-ports)
(begin/dataflow
(log-info "port-allocator ~v used ports: ~v" allocator-type (used-ports)))
(on (message (port-allocation-request $reqid allocator-type))
(define currently-used-ports (used-ports))

View File

@ -200,9 +200,10 @@
(else #f))))
(else #f)))
;; TODO: again, want to print this when local-ips or
;; active-state-vectors change.
;; (log-info "gestalt yielded statevecs ~v and local-ips ~v" statevecs local-ips)
(begin/dataflow
(log-info "SCN yielded statevecs ~v and local-ips ~v"
(active-state-vectors)
(local-ips)))
(define (deliver-outbound-packet p)
(match-define (tcp-packet #f