pretext icon indicating copy to clipboard operation
pretext copied to clipboard

Log messages from XSL processing

Open rbeezer opened this issue 2 years ago • 2 comments

I can do this, but checking with CLI (@oscarlevin, @StevenClontz).

I am on a mission to minimize messaging from XSL. But I do want certain things like deprecation messages to always be produced and nag authors.

So I can do this: I guess the lxml log messages should become log.critical()?

rbeezer avatar Jun 23 '22 16:06 rbeezer

To ensure that these are shown always, even if no -v is given, you would indeed need to put them in log.critical(). This is probably misleading though, since these should probably be log.warning(). We could easily adjust the default log level to show warnings, errors, and critical? Line 490 of pretext should be changed from log.setLevel(logging.CRITICAL) to log.setLevel(logging.WARNING)

oscarlevin avatar Jun 23 '22 17:06 oscarlevin

Discussion with @oscarlevin. Tag XSL messages with prepended text. Catch these on the message-by-message thread, and then log at different levels.

rbeezer avatar Jun 23 '22 19:06 rbeezer