Issue #00005566

Added WGA.Logger(name) to create named Log4j-Loggers.

If you use in your code, the default WGA logger will be used to log your messages. Because the default log level of this logger is "info", log.debug(message) will never appear in the console.

During development however you need debug messages.

Most developers therefore use instead of log.debug() during development and remove all when deploying to production server.

We now added the possibility to use your own logger in TMLScript by using the new WGA.Logger(name) method.

WGA.Logger(name) returns a WGALogger object, that has two usefull methods

getLogger() // returns the Log4J Logger object
setLevel(loglevel)  // sets the log level for this logger
    // possible values are "debug", "info", "warn" and "error"


var log = WGA.Logger("test").getLogger();"info");

This creates a custom logger with effective name "wga.test". The default log-level still is "info" so the debug message will still not appear on the console. You can however now change this in two ways:

1) Use


somewhere in your script to activate debug messages.

2) Start OpenWGA with system option


The second method is preferred as you don't need to change your code when going live.

If you need to debug a production server you can temporary enable debugging via TMLScript-Console by just executing


If your debugging session ist finished reset the logger by executing


Note: If you prefer console.log()/console.debug() over you can still use named Loggers:

console.logger = WGA.Logger("test").getLogger();
console.debug("some message");