Custom JSP tag. Provides a generic support for logging (tracing)
in your JSP pages. Tag setLogFile describes a log file and a body tag
logData writes own body into defined log. For example:
<%@ taglib uri="taglib.tld" prefix="log" %> <log:setLogFile fileName="c:/mylog.txt" id="A" /> ... <log:logData id="A"> This line will be saved in the log file associated with ID A </log:logData> setLogFile defines an application level ID. So you may use this tag for example only once per your application. logData tag uses one of described ID's for writing data into associated file. You may use also setLogState tag for switching logging process on and off. If the current state for some of ID's is switched off, logData tag uses this ID just skips own body. Attribute cond lets you skip logging regardless of the global state. Tags are: setLogFile Describes log file and an associated ID. Parameters are: 1) fileName Optional parameter. Describes a path to your log file.
By default system log will be used.
setLogState Describes log's state (on/off). Parameters are: 1) id log's ID
logData Body tag, writes own body into log file. Tag just skips own body if the current log's state is off. Parameters are: 1) id log's ID
for downloading: Library: logtag.jar Description: taglib.tld See also JSOS - the largest collection of servlets and filters. |
Also in JSOS:
|