logging.server fixes
parent
b120abcee2
commit
619d676af6
|
@ -42,7 +42,7 @@ SYMBOL: insomniac-recipients
|
|||
: email-log-report ( service word-names -- )
|
||||
"logging.insomniac" [ (email-log-report) ] with-logging ;
|
||||
|
||||
: schedule-insomniac ( alist -- )
|
||||
: schedule-insomniac ( service word-names -- )
|
||||
{ 25 } { 6 } f f f <when> -rot [
|
||||
[ email-log-report ] assoc-each rotate-logs
|
||||
] 2curry schedule ;
|
||||
|
|
|
@ -4,7 +4,7 @@ USING: logging.server sequences namespaces concurrency
|
|||
words kernel arrays shuffle tools.annotations
|
||||
prettyprint.config prettyprint debugger io.streams.string
|
||||
splitting continuations effects arrays.lib parser strings
|
||||
combinators.lib ;
|
||||
combinators.lib quotations ;
|
||||
IN: logging
|
||||
|
||||
SYMBOL: DEBUG
|
||||
|
@ -112,9 +112,13 @@ PRIVATE>
|
|||
|
||||
: log-critical ( error word -- ) CRITICAL (log-error) ;
|
||||
|
||||
: stack-balancer ( effect word -- quot )
|
||||
>r dup effect-in length r> [ over >r ERROR log-stack r> ndrop ] 2curry
|
||||
swap effect-out length f <repetition> append >quotation ;
|
||||
|
||||
: error-logging-quot ( quot word -- quot' )
|
||||
dup stack-effect effect-in length
|
||||
[ >r log-error r> ndrop ] 2curry
|
||||
[ [ log-error ] curry ] keep
|
||||
[ stack-effect ] keep stack-balancer compose
|
||||
[ recover ] 2curry ;
|
||||
|
||||
: add-error-logging ( word level -- )
|
||||
|
|
|
@ -84,7 +84,7 @@ SYMBOL: log-files
|
|||
(close-logs)
|
||||
log-root directory [ drop rotate-log ] assoc-each ;
|
||||
|
||||
: log-server-loop
|
||||
: log-server-loop ( -- )
|
||||
[
|
||||
receive unclip {
|
||||
{ "log-message" [ (log-message) ] }
|
||||
|
|
Loading…
Reference in New Issue