diff --git a/cogs/logging/log.scm b/cogs/logging/log.scm index 38c6f8749..666fb709e 100644 --- a/cogs/logging/log.scm +++ b/cogs/logging/log.scm @@ -1,59 +1,43 @@ (require-builtin steel/time) -(require-builtin steel/strings/colors as colors.) -(provide log! log/info! log/warn! log/debug! log/error!) +(provide log! + log/info! + log/warn! + log/debug! + log/error!) -(define *info* (colors.green "INFO")) -(define *warn* (colors.yellow "WARN")) -(define *debug* (colors.blue "DEBUG")) -(define *error* (colors.red "ERROR")) -(define *trace* (colors.purple "TRACE")) - -; (displayln "LOADING MODULE") - -; (define (log! level target arg-list) -; (apply displayln (append -; (list -; (local-time/now! "%Y-%m-%dT%H:%M:%S") -; " [" -; level -; " " -; target -; "] - ") -; arg-list))) +(define *info* "INFO") +(define *warn* "WARN") +(define *debug* "DEBUG") +(define *error* "ERROR") +(define *trace* "TRACE") ;;@doc ;; Log directly on the specified level the with arguments, as a list (define (log! level arg-list) - (apply displayln (append - (list - (local-time/now! "%Y-%m-%dT%H:%M:%S") - " [" - level - "] - ") - arg-list))) + (apply displayln (append (list (local-time/now! "%Y-%m-%dT%H:%M:%S") " [" level "] - ") arg-list))) ;;@doc ;; Log the arguments using the *info* target, i.e. log on INFO (define (log/info! . args) - (log! *info* args)) + (log! *info* args)) ;;@doc ;; Log the arguments using the *warn* target, i.e. log on WARN (define (log/warn! . args) - (log! *warn* args)) + (log! *warn* args)) ;;@doc ;; Log the arguments using the *debug* target, i.e. log on DEBUG (define (log/debug! . args) - (log! *debug* args)) + (log! *debug* args)) ;;@doc ;; Log the arguments using the *error* target, i.e. log on ERROR (define (log/error! . args) - (log! *error* args)) + (log! *error* args)) ;;@doc ;; Log the arguments using the *trace* target, i.e. log on TRACE (define (log/trace! . args) - (log! *trace* args)) \ No newline at end of file + (log! *trace* args)) diff --git a/crates/steel-core/src/parser/parser.rs b/crates/steel-core/src/parser/parser.rs index 2e3bab9b1..54000a29b 100644 --- a/crates/steel-core/src/parser/parser.rs +++ b/crates/steel-core/src/parser/parser.rs @@ -1615,12 +1615,12 @@ mod parser_tests { #[test] fn parse_unicode() { assert_parse("#\\¡", &[character('¡')]); - assert_parse("#\\\\u{b}", &[character('\u{b}')]); + assert_parse("#\\u{b}", &[character('\u{b}')]); } #[test] fn parse_more_unicode() { - assert_parse("#\\\\u{a0}", &[character('\u{a0}')]); + assert_parse("#\\u{a0}", &[character('\u{a0}')]); } #[test]