Log rotation
parent
23f9578505
commit
faa96f887b
|
@ -13,7 +13,7 @@ io.encodings.ascii
|
||||||
io.encodings.binary
|
io.encodings.binary
|
||||||
io.streams.limited
|
io.streams.limited
|
||||||
io.timeouts
|
io.timeouts
|
||||||
fry logging calendar urls
|
fry logging logging.insomniac calendar urls
|
||||||
http
|
http
|
||||||
http.server.responses
|
http.server.responses
|
||||||
html.elements
|
html.elements
|
||||||
|
@ -140,4 +140,7 @@ LOG: httpd-hit NOTICE
|
||||||
: httpd-main ( -- )
|
: httpd-main ( -- )
|
||||||
8888 httpd ;
|
8888 httpd ;
|
||||||
|
|
||||||
|
: httpd-insomniac ( -- )
|
||||||
|
"http.server" { httpd-hit } schedule-insomniac ;
|
||||||
|
|
||||||
MAIN: httpd-main
|
MAIN: httpd-main
|
||||||
|
|
|
@ -42,11 +42,9 @@ SYMBOL: log-service
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
PREDICATE: one-string-array < array
|
|
||||||
[ length 1 = ] [ [ string? ] all? ] bi and ;
|
|
||||||
|
|
||||||
: stack>message ( obj -- inputs>message )
|
: stack>message ( obj -- inputs>message )
|
||||||
dup one-string-array? [ first ] [
|
dup array? [ dup length 1 = [ first ] when ] when
|
||||||
|
dup string? [
|
||||||
[
|
[
|
||||||
string-limit off
|
string-limit off
|
||||||
1 line-limit set
|
1 line-limit set
|
||||||
|
@ -54,7 +52,7 @@ PREDICATE: one-string-array < array
|
||||||
0 margin set
|
0 margin set
|
||||||
unparse
|
unparse
|
||||||
] with-scope
|
] with-scope
|
||||||
] if ;
|
] unless ;
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
USING: accessors kernel sequences assocs io.files io.sockets
|
USING: accessors kernel sequences assocs io.files io.sockets
|
||||||
io.server
|
io.server
|
||||||
namespaces db db.tuples db.sqlite smtp
|
namespaces db db.tuples db.sqlite smtp
|
||||||
|
logging.insomniac
|
||||||
http.server
|
http.server
|
||||||
http.server.dispatchers
|
http.server.dispatchers
|
||||||
furnace.alloy
|
furnace.alloy
|
||||||
|
@ -61,10 +62,13 @@ TUPLE: factor-website < dispatcher ;
|
||||||
: init-factor-website ( -- )
|
: init-factor-website ( -- )
|
||||||
"factorcode.org" 25 <inet> smtp-server set-global
|
"factorcode.org" 25 <inet> smtp-server set-global
|
||||||
"todo@factorcode.org" lost-password-from 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
|
init-factor-db
|
||||||
<factor-website> main-responder set-global ;
|
<factor-website> main-responder set-global ;
|
||||||
|
|
||||||
: start-factor-website ( -- )
|
: start-factor-website ( -- )
|
||||||
test-db start-expiring
|
test-db start-expiring
|
||||||
test-db start-update-task
|
test-db start-update-task
|
||||||
|
httpd-insomniac
|
||||||
8812 httpd ;
|
8812 httpd ;
|
||||||
|
|
Loading…
Reference in New Issue