logger.Level PropertySets or returns the logging level for a logger object. Read/write.object.Level (LogLevel) Arguments
RemarksIf 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 ObjectRequirements |