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 \
|
||||
members-payments.import.scm web-static.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 \
|
||||
ansi.o util-dict-list.o command-line.o members-base.o \
|
||||
|
|
|
@ -38,7 +38,8 @@
|
|||
texts
|
||||
tests
|
||||
reminders
|
||||
util-mail)
|
||||
util-mail
|
||||
logging)
|
||||
|
||||
;; Print banner
|
||||
(print "HackerBase 0.9.5 (c) 2023 Brmlab, z.s.")
|
||||
|
@ -103,6 +104,8 @@
|
|||
(-send-emails- #t))
|
||||
(-mailto (email) "Override all outgoing emails destination"
|
||||
(*mailto-override* email))
|
||||
(-logfile (filename) "Enable logging to file"
|
||||
(*log-file* filename))
|
||||
""
|
||||
"Query options:"
|
||||
(-mi (id) "Specify member by id" (-member-id- (string->number id)))
|
||||
|
@ -281,6 +284,7 @@
|
|||
((repl)
|
||||
(repl))
|
||||
((genweb)
|
||||
(log-info "Generating static web files")
|
||||
(gen-web-static MB (-web-dir-)))
|
||||
((edit)
|
||||
(if mr
|
||||
|
|
|
@ -70,12 +70,14 @@
|
|||
(when (or (not (*log-file*))
|
||||
(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"
|
||||
(format-current-time)
|
||||
(string-upcase (symbol->string level))
|
||||
(apply format fmt args))
|
||||
(log-file))
|
||||
(newline (log-file))
|
||||
(flush-output (log-file))))
|
||||
|
||||
;; Specific log procedures
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue