How To Enable LoggingThe Wyvern logging support is built into wyvern.lib.Kernel, as a set of utility methods. To use logging, you just have to import wyvern.lib.Kernel. In Jython, it looks like this:
In Java, we usually import everything in wyvern.lib, since wyvern.lib has almost all the imports you need, under normal circumstances:
You can do this in Jython as well, with:
This tutorial is a lesson trail. You can see what lesson you're on by the highlighted link in the left navbar. You should read through the entire tutorial before you start using logging in your code, or you'll probably get yourself into trouble. The next lesson covers Log Levels, which is how you decide which messages you feel like looking at.
|