Logger Usage

The ARchitect Tools come equipped with a logging console which is shared by the system and the developer.

On start-up of each world, the ARchitect library creates a singleton AR.logger instance, which can be used by the developer to log messages.

To see the log messages, you need to call the javascript function AR.logger.activateDebugMode(), for example in the body.onLoad trigger:

<body onLoad="javascript:AR.logger.activateDebugMode();">

  <!-- your body content -->

</body>

</html>

When activateDebugMode is called, it automatically creates a button at the bottom of your display, which allows you to open the Logging console ("Open Logging Window"). When you click the button, the logging window appears. There, you can select the log-levels you would like to see, and you can close the logging console again.

Bear in mind that the system itself will also use the logging framework to log messages, thus allowing you to debug if anything unexpected happens.

Please remember to deactivate the logging framework before you actually publish your world by not using AR.logger.activateDebugMode(). Otherwise, the users of your ARchitect world will always see the button at the bottom of the page, and would be able to follow debug messages.