MacPorts Base: Support for a lower level of debug output, like ui_trace, or ui_debug2/ui_debug3?

Ryan Schmidt ryandesign at macports.org
Wed May 26 10:02:22 UTC 2021


On May 26, 2021, at 04:53, Georges Martin wrote:

>> I personally find debug mode too verbose already and think we should reduce the amount of information produced by debug mode.
> 
> I don’t know enough about Tcl logging but in Python you can have separate, hierarchical loggers for each major modules in your system and then activate and set the logging level for each of them.
> 
> It means you could have a top logger (« macports ») set to INFO…
> 
>>> That would allow us to optionally output more diagnostic info in various areas, such as our portgroups,
> 
> …and several module loggers (« macports.portgroups », « macports.portgroups.compiler_blacklist »,…) set to DEBUG.
> 
> The advantage is that you keep a manageable, standard set of logging levels and have a small set of functional module loggers.

In MacPorts, there are six output "levels": error, warn, msg, notice, info, debug. Each piece of code that wishes to produce output decides the appropriate level for each line of output. The main.log contains all output, in a similar but different format to that which you get if you use the debug flag (-d). The verbose flag (-v) gives you less output than debug, and normal mode (no flag) gives you less output than that.



More information about the macports-dev mailing list