log.setLevel: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{MacroFunction |name=log.setLevel |trusted=true |version=1.5.2 |description= Set the logging level for the specified logger. <br>The log file will be found in your user dire...") |
No edit summary |
||
Line 13: | Line 13: | ||
'''Parameters''' | '''Parameters''' | ||
{{param|logger|String containing a logger name.}} | {{param|logger|String containing a logger name.}} | ||
{{param|loglevel|String containing a log level: DEBUG,ERROR,FATAL | {{param|loglevel|String containing a log level: DEBUG,INFO,WARN,ERROR,FATAL}} | ||
The default level for all loggers is ERROR which means that only messages at ERROR or FATAL log level will be output. The levels noted above are in verbosity order from most(DEBUG) to least(FATAL). | |||
|example= | |example= |
Revision as of 17:11, 18 April 2019
log.setLevel() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.5.2
Set the logging level for the specified logger.
The log file will be found in your user directory under
The log file will be found in your user directory under
.maptool-rptools/logs
.Usage
log.setLevel(logger, loglevel)
Parameters
logger
- String containing a logger name.loglevel
- String containing a log level: DEBUG,INFO,WARN,ERROR,FATAL
The default level for all loggers is ERROR which means that only messages at ERROR or FATAL log level will be output. The levels noted above are in verbosity order from most(DEBUG) to least(FATAL).
Example
Set the logging level for the MapToolLineParser to WARN.
[r: log.setLevel("net.rptools.maptool.client.MapToolLineParser","WARN")]
Returns:
WARN