diff options
author | Ebus-at-dockstar <ebus@dockstar> | 2014-07-26 20:34:34 +0200 |
---|---|---|
committer | Ebus-at-dockstar <ebus@dockstar> | 2014-07-26 20:34:34 +0200 |
commit | b04b3062e94c95578c4ec0436d86c9803b86b3f2 (patch) | |
tree | 17ae8e261dcbe279d6596d7d399406281dfb9815 /ebus-racket/ebus/layer2.rkt | |
parent | 99c6eb21eb7ff9a072b87d9d64324871ea7201f1 (diff) | |
download | ebus-alt-b04b3062e94c95578c4ec0436d86c9803b86b3f2.tar.gz ebus-alt-b04b3062e94c95578c4ec0436d86c9803b86b3f2.zip |
changed logging
Diffstat (limited to 'ebus-racket/ebus/layer2.rkt')
-rw-r--r-- | ebus-racket/ebus/layer2.rkt | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/ebus-racket/ebus/layer2.rkt b/ebus-racket/ebus/layer2.rkt index 192f7f5..3141452 100644 --- a/ebus-racket/ebus/layer2.rkt +++ b/ebus-racket/ebus/layer2.rkt @@ -2,8 +2,7 @@ (require racket/bool (planet bzlib/parseq:1:3)) -(define logger (make-logger 'ebus-layer2 (current-logger))) -(current-logger logger) +(define-logger ebus2) ;; Ebus SYN (define ebus-const-syn #xaa) @@ -84,16 +83,13 @@ (define (read-ebus input-port) (define syn ((make-reader ebus-sync #:sof? #f #:eof? #f) input-port)) (define paket ((make-reader parse-ebus-paket #:sof? #f #:eof? #f) input-port)) - (cond ((not (false? syn)) - (log-debug "drop ~s x SYN (~s)" syn ebus-const-syn))) - (cond ((not (false? paket)) - paket) - ((eof-object? (peek-byte input-port)) - eof) + (cond ((not (false? syn)) (log-ebus2-debug "dropped ~a x SYN (~a)" syn ebus-const-syn))) + (cond ((not (false? paket)) paket) + ((eof-object? (peek-byte input-port)) eof) (else ;; skip one byte (let ([byte (read-byte input-port)]) - (log-debug "drop ~s 0x~x" byte byte)) + (log-ebus2-debug "drop ~s 0x~x" byte byte)) (read-ebus input-port)))) (provide @@ -102,5 +98,4 @@ (prefix-out layer2- (struct-out ebus-paket)) (prefix-out layer2- (struct-out ebus-body-broadcast)) (prefix-out layer2- (struct-out ebus-body-mastermaster)) - (prefix-out layer2- (struct-out ebus-body-masterslave)) - (prefix-out layer2- logger)) + (prefix-out layer2- (struct-out ebus-body-masterslave))) |