Log static web file generator.
This commit is contained in:
parent
e8bd82ef1e
commit
8abf44b2c8
3 changed files with 9 additions and 3 deletions
|
@ -37,7 +37,7 @@ HACKERBASE-DEPS=hackerbase.scm month.import.scm \
|
||||||
cards.import.scm members-print.import.scm \
|
cards.import.scm members-print.import.scm \
|
||||||
members-payments.import.scm web-static.import.scm \
|
members-payments.import.scm web-static.import.scm \
|
||||||
environment.import.scm mailman.import.scm texts.import.scm \
|
environment.import.scm mailman.import.scm texts.import.scm \
|
||||||
tests.import.scm reminders.import.scm
|
tests.import.scm reminders.import.scm logging.import.scm
|
||||||
|
|
||||||
HACKERBASE-OBJS=hackerbase.o testing.o listing.o month.o period.o \
|
HACKERBASE-OBJS=hackerbase.o testing.o listing.o month.o period.o \
|
||||||
ansi.o util-dict-list.o command-line.o members-base.o \
|
ansi.o util-dict-list.o command-line.o members-base.o \
|
||||||
|
|
|
@ -38,7 +38,8 @@
|
||||||
texts
|
texts
|
||||||
tests
|
tests
|
||||||
reminders
|
reminders
|
||||||
util-mail)
|
util-mail
|
||||||
|
logging)
|
||||||
|
|
||||||
;; Print banner
|
;; Print banner
|
||||||
(print "HackerBase 0.9.5 (c) 2023 Brmlab, z.s.")
|
(print "HackerBase 0.9.5 (c) 2023 Brmlab, z.s.")
|
||||||
|
@ -103,6 +104,8 @@
|
||||||
(-send-emails- #t))
|
(-send-emails- #t))
|
||||||
(-mailto (email) "Override all outgoing emails destination"
|
(-mailto (email) "Override all outgoing emails destination"
|
||||||
(*mailto-override* email))
|
(*mailto-override* email))
|
||||||
|
(-logfile (filename) "Enable logging to file"
|
||||||
|
(*log-file* filename))
|
||||||
""
|
""
|
||||||
"Query options:"
|
"Query options:"
|
||||||
(-mi (id) "Specify member by id" (-member-id- (string->number id)))
|
(-mi (id) "Specify member by id" (-member-id- (string->number id)))
|
||||||
|
@ -281,6 +284,7 @@
|
||||||
((repl)
|
((repl)
|
||||||
(repl))
|
(repl))
|
||||||
((genweb)
|
((genweb)
|
||||||
|
(log-info "Generating static web files")
|
||||||
(gen-web-static MB (-web-dir-)))
|
(gen-web-static MB (-web-dir-)))
|
||||||
((edit)
|
((edit)
|
||||||
(if mr
|
(if mr
|
||||||
|
|
|
@ -70,12 +70,14 @@
|
||||||
(when (or (not (*log-file*))
|
(when (or (not (*log-file*))
|
||||||
(not (log-file)))
|
(not (log-file)))
|
||||||
(when (not (log-file))
|
(when (not (log-file))
|
||||||
(log-file (open-output-file (*log-file*) #:append)))
|
(log-file (open-output-file (*log-file*) #:append))
|
||||||
|
(log-info "Logging started"))
|
||||||
(display (format "~A [~A] ~A"
|
(display (format "~A [~A] ~A"
|
||||||
(format-current-time)
|
(format-current-time)
|
||||||
(string-upcase (symbol->string level))
|
(string-upcase (symbol->string level))
|
||||||
(apply format fmt args))
|
(apply format fmt args))
|
||||||
(log-file))
|
(log-file))
|
||||||
|
(newline (log-file))
|
||||||
(flush-output (log-file))))
|
(flush-output (log-file))))
|
||||||
|
|
||||||
;; Specific log procedures
|
;; Specific log procedures
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue