IR Framework

logger.Level Property

Sets or returns the logging level for a logger object. Read/write.
object.Level (LogLevel)

Arguments

object
Required. Always the name of a logger object.


LogLevel
Optional. If provided, LogLevel is the new log level at or above which logging will occur.



Remarks

If LogLevel is not a valid log level, the Level property is not changed. Using the LEVEL constants is recommended.

The following example illustrates the use of the Level property.

//	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");


Applies To:

logger Object



Requirements