The following example illustrates the use of the LEVEL constants.
// create a logger and set the level to DEBUG and write entries to the Console window
var myLogger = new Application.logger();
myLogger.Level(myLogger.LEVEL.DEBUG);
myLogger.trace("trace"); // TRACE is lower than DEBUG, so this won't do anything
myLogger.debug("debug");
myLogger.error("error");
// make the logger write entries to My Documents\mylog.log
myLogger.Target("mylog.log");
myLogger.trace("trace"); // TRACE is lower than DEBUG, so this won't do anything
myLogger.debug("debug");
myLogger.error("error");