Last publication:23/02/2018at 2:45 PMCédricDamioli
Introduction
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.
Base
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
Oops !
Copy to clipboard failed. Open the code and copy it manually.
var entry = new org.ametys.log.LoggerEntry(org.ametys.log.LoggerEntry.LEVEL_DEBUG, "mylogcategory", new Date(), "mylogmessage", "mylogmessagedetails");
org.ametys.log.LoggerManager.getInstance().getEntries().push(entry);
var entry = new org.ametys.log.LoggerEntry(org.ametys.log.LoggerEntry.LEVEL_DEBUG, "mylogcategory", new Date(), "mylogmessage", "mylogmessagedetails");
org.ametys.log.LoggerManager.getInstance().getEntries().push(entry);
var entry = new org.ametys.log.LoggerEntry(org.ametys.log.LoggerEntry.LEVEL_DEBUG, "mylogcategory", new Date(), "mylogmessage", "mylogmessagedetails");
org.ametys.log.LoggerManager.getInstance().getEntries().push(entry);
See the API for more information.
Shortcuts
To log simply, use these
Oops !
Copy to clipboard failed. Open the code and copy it manually.