Log rotation

db4
Slava Pestov 2008-06-14 02:45:26 -05:00
parent 23f9578505
commit faa96f887b
3 changed files with 11 additions and 6 deletions

View File

@ -13,7 +13,7 @@ io.encodings.ascii
io.encodings.binary
io.streams.limited
io.timeouts
fry logging calendar urls
fry logging logging.insomniac calendar urls
http
http.server.responses
html.elements
@ -140,4 +140,7 @@ LOG: httpd-hit NOTICE
: httpd-main ( -- )
8888 httpd ;
: httpd-insomniac ( -- )
"http.server" { httpd-hit } schedule-insomniac ;
MAIN: httpd-main

View File

@ -42,11 +42,9 @@ SYMBOL: log-service
<PRIVATE
PREDICATE: one-string-array < array
[ length 1 = ] [ [ string? ] all? ] bi and ;
: stack>message ( obj -- inputs>message )
dup one-string-array? [ first ] [
dup array? [ dup length 1 = [ first ] when ] when
dup string? [
[
string-limit off
1 line-limit set
@ -54,7 +52,7 @@ PREDICATE: one-string-array < array
0 margin set
unparse
] with-scope
] if ;
] unless ;
PRIVATE>

View File

@ -3,6 +3,7 @@
USING: accessors kernel sequences assocs io.files io.sockets
io.server
namespaces db db.tuples db.sqlite smtp
logging.insomniac
http.server
http.server.dispatchers
furnace.alloy
@ -61,10 +62,13 @@ TUPLE: factor-website < dispatcher ;
: init-factor-website ( -- )
"factorcode.org" 25 <inet> smtp-server set-global
"todo@factorcode.org" lost-password-from set-global
"website@factorcode.org" insomniac-sender set-global
"slava@factorcode.org" insomniac-recipients set-global
init-factor-db
<factor-website> main-responder set-global ;
: start-factor-website ( -- )
test-db start-expiring
test-db start-update-task
httpd-insomniac
8812 httpd ;