Opentaps 2 Logging Service
opentaps 2 Logging Service
Logging in opentaps 2 is handled by log4j. The org.opentaps.core.log.Log has methods to log messages with OSGi standardized LogService service. There are 4 group of methods for 4 severity levels defined in LogService interface: debug, error, warning, info).
Log file can be found in <geronimoHome>/var/log/geronimo.log. Logging configurations are set in server-log4j.properties in the same directory. Currently by default the root logger is configured to INFO level and this mean all messages will appear in the log except those with DEBUG severity. For those of you familiar with opentaps v1, the "debug" level is comparable to Verbose from ofbiz.
To write to the log,
import org.opentaps.core.log.Log; //... Log.logInfo("Note created with id [" + note.getId() + "]");
2012-01-25 16:55:41,669 INFO [core] Note created with id [31970A55CA89482BB6CF9F67F19B945B]