Support a .debug() or similar method on Logger
It would be nice to use the Saxon Logger interface, rather than dragging in a(nother) logging framework to print diagnostic messages. But there's no method on Logger that's usually below the threshold at which messages are printed. Consider the case of registering extension functions. I don't want to print "Registering extension functions" every time Saxon is run, but I do want to be able to run Saxon with some sort of flag or option that will print messages at that level so that I can trace problems other users are having.
In particular, I'm looking at adding a message for the case where an extension function would have been registered, but it's detected that some third party library isn't available on the classpath. On the one hand, that's a useful message if you're trying to figure out why ext:foo() isn't available. On the other hand, if you don't care about ext:foo() and have no intention of putting the required library on your classpath, seeing that debug message everytime is going to become irritating.
#1 Updated by Michael Kay over 1 year ago
I think this is what Logger.info() was intended for; but we aren't really using the mechanism properly: we have almost no code that changes the logging threshold, and we have other mechanisms in parallel, e.g. the -t flag doesn't change the logging threshold, it sets a flag in Configuration that's checked independently; similarly for -TJ which is in the kind area you're talking about.
There should probably also be a system of message categories that's orthogonal to level.
Please register to edit this issue