This document explains how to log into the js console.

Currently the js console does not exist, but will soon do : so starting logging is a good thing.


The classes are org.ametys.log.LoggerManager and org.ametys.log.LoggerEntry.

You have to create a logger entry and add it to the logger manager this way

var entry = new org.ametys.log.LoggerEntry(org.ametys.log.LoggerEntry.LEVEL_DEBUG, "mylogcategory", new Date(), "mylogmessage", "mylogmessagedetails");

See the API for more information.


To log simply, use these

org.ametys.log.LoggerManager.debug(category, message, details), message, details)
org.ametys.log.LoggerManager.warning(category, message, details)
org.ametys.log.LoggerManager.error(category, message, details)
org.ametys.log.LoggerManager.fatalerror(category, message, details)
Back to top