Debugging Your Code

How To Enable Logging

The 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:

from wyvern.lib import Kernel

In Java, we usually import everything in wyvern.lib, since wyvern.lib has almost all the imports you need, under normal circumstances:

import wyvern.lib.*;

You can do this in Jython as well, with:

from wyvern.lib import *

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.

<< Previous Chapter Next Chapter >>