Portlet Factory, Version 6.1.2
Logging application behavior
To debug an application, log the output of arbitrary actions and methods during execution.
Placing System.out.println() 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.
Parent topic: Overview: application logging
- Default logging level
There are default settings for the log4j features that are set when the project is initially built.
- Preventing log4j properties from being overwritten
In the Eclipse workspace, the log4j properties file is overwritten when you modify a WebApp project.
- About using built-in logging in Web Service Call and SQL Call builders
The Web Service Call and SQL Call builders connect to resources outside of your working model. Therefore, it is useful in development to be able to log the events that occur within these builders to ensure that the data from the resources is being accessed correctly.
- 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, debugTracing, event_DATE, general, incomingSOAPRequests, modelActions, profileSelection, regen, request, serviceCalls.
- About logging with the View and Form builders
When you place a View and Form builder (for example, Domino, SAP, or PeopleSoft) in a model, you are unable to insert calls to a method before a method call made by the View and Form builder.
- Changing the default logging level
Edit a properties file to change what is logged by default.
- Setting up logging in a model-based builder
Edit a base model to set up calls to your logging methods.
- Setting up logging in service call and SQL builders
Use the following procedure to set up logging in Service Call and SQL builders.
- Viewing a log
To view a log, navigate to the log file and open it in a text editor.
Library | Support |