A handy debugging technique available to any OFBiz Java programmer at any time is to write messages to the OFBiz console log from within your program.
Firstly, ensure the following:
1. Make sure to import the OFBiz
org.ofbiz.base.util.Debug
utility into your Java program.2. To ensure that your logfile entry is properly marked with the class name and line number from where it was called, check that the Java constant named
module
is defined within your class file as shown below:public static final String module = MyClass.class.getName();
3. If you have turned off console window logging (the default out-of-the-box setting), make sure to return the startup file to its original setting to allow logging to the console window.