To debug an application, log the output of arbitrary actions and methods during execution.
statements in the code is both tedious and error prone. In addition, using System.out
provides no control over when the line is printed.
In IBM® WebSphere® Portlet Factory, you can get the same degree of information more simply by defining methods that can output to log files or the system console. And you can control the behavior of these methods through central logging properties. This increased flexibility allows you to choose only to view warnings, errors, or other information (for example, when a button is pressed).
Logging is enabled by default in WebSphere Portlet Factory Designer. Simply run a model and invoke some model actions and those actions are written to the log.
By default, the logging level is set to WARN which results in much information being written to the various log files.
Preventing log4j properties from being overwritten
In the Eclipse workspace, the log4j properties file is overwritten when you modify a WebApp project.
About viewing a log file
IBM WebSphere Portlet Factory Designer provides a set of files that a model can use to write information from various sources, including: builderCalls
About logging with the View and Form builders
When you place a View and Form builder in a model, you are unable to insert calls to a method before a method call made by the View and Form builder.
Parent topic: Setting up logging in a model-based builder