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/layer7.rkt | |
parent | 99c6eb21eb7ff9a072b87d9d64324871ea7201f1 (diff) | |
download | ebus-alt-b04b3062e94c95578c4ec0436d86c9803b86b3f2.tar.gz ebus-alt-b04b3062e94c95578c4ec0436d86c9803b86b3f2.zip |
changed logging
Diffstat (limited to 'ebus-racket/ebus/layer7.rkt')
-rw-r--r-- | ebus-racket/ebus/layer7.rkt | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ebus-racket/ebus/layer7.rkt b/ebus-racket/ebus/layer7.rkt index 60f8bbc..76ea6ae 100644 --- a/ebus-racket/ebus/layer7.rkt +++ b/ebus-racket/ebus/layer7.rkt @@ -6,8 +6,7 @@ "xexpr-path/main.rkt" "layer2.rkt") -(define logger (make-logger 'ebus-layer7 (current-logger))) -(current-logger logger) +(define-logger ebus7) (define definition (parameterize ([collapse-whitespace #t] @@ -17,7 +16,7 @@ (define (paket ebus-paket) (define primaryCommand (number->string (layer2-ebus-paket-primaryCommand ebus-paket))) (define secondaryCommand (number->string (layer2-ebus-paket-secondaryCommand ebus-paket))) - (log-debug "Lookup paket primaryCommand=~a secondaryCommand=~a" primaryCommand secondaryCommand) + (log-ebus7-debug "Lookup paket primaryCommand=~a secondaryCommand=~a" primaryCommand secondaryCommand) (xexpr-path-first (list 'packets 'packet (list 'primary primaryCommand) (list 'secondary secondaryCommand)) definition)) @@ -46,7 +45,7 @@ (define payload (layer2-ebus-paket-payload ebus-paket)) (for/list ([decoder decoders]) (decoder payload))) - (else (void (log-info "Unknown Paket from source ~s(~s): ~s" + (else (void (log-ebus7-info "Unknown Paket from source ~s(~s): ~s" (layer2-ebus-paket-source ebus-paket) source-device-name ebus-paket))))) @@ -57,7 +56,7 @@ (define name (string-append paket-id "." (xexpr-path-first '((name)) field))) (define offset (string->number (xexpr-path-first '((offset)) field))) (define decoder (hash-ref decoder-table type #f)) - (cond ((false? decoder) (void (log-warning "No decoder for type ~s" type))) + (cond ((false? decoder) (void (log-ebus7-warning "No decoder for type ~s" type))) (else (curry (car decoder) name field offset)))) (define decoder-table @@ -168,6 +167,5 @@ (prefix-out layer7- device) (prefix-out layer7- device-name) (prefix-out layer7- definition) - ;; read ebus from port an return fields from next paket - (prefix-out layer7- read-ebus) - (prefix-out layer7- logger)) + ;; read ebus from port an return fields from next paket + (prefix-out layer7- read-ebus)) |