Tools and Debugging
Web Developer Tools
Console
The console offers an easy way to access and test JavaScript without making changes to JavaScript inside the Bundle resource files.
Inspecting Elements and Styles
- Select JavaScript code under Sources tab.
- Create break point.
- Execute code and test locally available data.
Break Points and debugging
- Modifying styles.
- Determining layout.
Kinetic Request Logging
The Kinetic Request Admin Console provides a convenient way to access the most recent logs from kslog.log through a web browser. The kslog.log will hold important information regarding server side code executed from within the Kinetic Request application. This log will also contain error information that maybe generated from within the JSP Bundle code. The kslog.log plays a crucial role in JSP development inside the Bundle.
Kinetic Request Logging - Admin Console
The Kinetic Request log can be easily accessed from the Kinetic Request Admin Console.
Kinetic Request Logging - kslog.log on the web server
Sometimes we need to look back at older log information. For this, we can simply access the web server with the Kinetic Request install and open the kslog.log file directly or use a command line to view. It's important to note, that you might sometimes see multiple kslog files with numbers appended to the end of the filename. These are older logs that are being chucked and stored.
Apache Log4j
Log4jis available from the Bundle and it is wrapped inside a log helper. This log helper is stored under the common/framework/helpers/LogHelper.jspf. It is very useful for any JSP development.
// Create an object to output in the kslog.log. Map<String,String> myObject = new LinkedHashMap<String,String>(); myObject.put("name", "Darth Vader"); myObject.put("spaceship", "Death Star"); // Instantiate the logger Logger logger = LogHelper.getLogger(); try { logger.debug("My Object " + myObject); logger.debug("I got this far."); } catch (Exception e) { logger.error("KAAAAAAAAHN! -- It failed: " + e); }
What you will see in kslog.log:
2014-05-17 10:02:51,709:http-8080-exec-8:DEBUG - {Catalog}: status is [INITIAL]. 2014-05-17 10:02:52,719:http-8080-exec-8:DEBUG - My Object {name=Darth Vader, spaceship=Death Star} 2014-05-17 10:02:52,719:http-8080-exec-8:DEBUG - I got this far.
Tags recommended by the template: stage:draft, article:topic-feature