logging: let's include the tb when logging errors, makes it way easier

to debug!
db4
Björn Lindqvist 2015-09-24 11:43:48 +02:00
parent d465924396
commit be7fc6f7c9
1 changed files with 5 additions and 4 deletions

View File

@ -112,12 +112,13 @@ PRIVATE>
: add-output-logging ( word level -- )
[ output-logging-quot ] (define-logging) ;
: error>string ( error -- string )
[ print-error :c ] with-string-writer ;
: (log-error) ( object word level -- )
log-service get [
[ [ print-error ] with-string-writer ] 2dip log-message
] [
2drop rethrow
] if ;
[ error>string ] 2dip log-message
] [ 2drop rethrow ] if ;
: log-error ( error word -- ) ERROR (log-error) ;