|Did you know ...||Search Documentation:|
:- use_module(library(debug)).(can be autoloaded)
nodebug(_)removes all topics. Gives a warning if the topic is not defined unless it is used from a directive. The latter allows placing debug topics at the start of a (load-)file without warnings.
For debug/1, Topic can be a term Topic > Out, where Out is either a stream or stream-alias or a filename (atom). This redirects debug information on this topic to the given output.
it's not totally clear from the docs how to remove unwanted "no matching debug topic (yet)" messages. The docs say a warning is emitted (a) if the topic is "defined" and (b) it is not used from a directive.
There isn't really any instruction on how to "define" topics, other than via debug/1... which prints the warning!
It seems the preferred way to do this is to declare the topics as directives using nodebug/1
:- nodebug(topic1). :- nodebug(topic2). ...