You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by "Pill, Juergen" <Ju...@softwareag.com> on 2001/03/21 12:29:26 UTC

request/response logging in Slide (server)

Hello,

we have returned a new feature in Slide, which may be of interest for you:
Server side request and response logging.

This feature (if switched on) allows the server to log all the information
in A XML format the request and response contain.

To use this feature, either the SimpleLogger (default) or the
log4j.Log4jLogger can be used. In the second case the output channel can be
a file, to seperate  "normal" logging from request/response logging.



1) If you use the simple logger, you will need following line in your
domain.xml file:

<slide logger="org.apache.slide.util.logger.SimpleLogger" logger-level="7">

In this case all output is generated at the command line.


2) if you use the log4J logger following line is required in your domain.xml
file:

<slide logger="log4j.Log4jLogger" logger-level="6">

This statement will perform two things:

a) initialise and use the log4J logger
b) set the level 6 (e.g.) to the default channel/category

If you want to specify more logging details, you will need to place a file
named log4j.properties into the root of your classpath. it may contain
something similar like this (please refer to log4J for more details about
the format):


# An example log4j configuration file that outputs to System.out.
# The output info consists of priority, thread name,
# category name the message in that order.

# For the general syntax of propperty based configuration files see
# the documenation of org.log4j.PropertyConfigurator.

# The root category uses the appender called CONSOLE. Since no priority is
# specified, the root category assumes the default priority for root
# which is DEBUG in log4j. The root category is the only category that
# has a default priority. All other categories do not have a default
# priority. in which case the priority is inherited from the
# hierarchy. The priorities are ERROR, WARN, INFO, DEBUG, listed in
# decreasing order of priority. To disable all logging requests
# regardless of category and priority set rootCategory=EMERG,
# the highest possible priority, and outcomment all other categories.

; log4j.configDebug=true

# Set root category priority to INFO and its only appender to CONSOLE
log4j.rootCategory=INFO, CONSOLE

# -------------- C O N S O L E   Definition
------------------------------------
# CONSOLE is set to be a FileAppender which outputs to System.out.
log4j.appender.CONSOLE=org.apache.log4j.FileAppender
log4j.appender.CONSOLE.File=System.out
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%-5p [%t] - %m%n
# -------------- C O N S O L E   Definition
------------------------------------


# -------------- L O G  F I L E    Definition
------------------------------------
log4j.appender.LogFile=org.apache.log4j.FileAppender
log4j.appender.LogFile.File=/projects/jakarta-tomcat/xdav.xml
# log4j.appender.LogFile.MaxFileSize=1024KB
# Keep one backup file
# log4j.appender.LogFile.MaxBackupIndex=1
log4j.appender.LogFile.layout=org.apache.log4j.PatternLayout
log4j.appender.LogFile.layout.ConversionPattern=%m%n
log4j.appender.LogFile.Append=false
# -------------- L O G  F I L E    Definition
------------------------------------





# This is to indicate the priority of some packages, here:
# Print only messages of priority DEBUG or above in the package
# com.softwareag.xTools
;log4j.category.com.softwareag.xtools.xdav.jdomobjects.XDescriptors=DEBUG
;log4j.category.com.softwareag.xtools.xdav.jdomobjects.XStateMachine=DEBUG
;log4j.category.com.softwareag.xtools.xdav.datastore.XDbSession=DEBUG
;log4j.category.com.softwareag.xtools.xdav.store.XContentStore=DEBUG
; log4j.category.com.softwareag.xtools.xdav=DEBUG
; ----------------- set the XML logger to print to File and do not inherit
from root ----------------
log4j.category.org.apache.slide.webdav.WebdavServlet.requestResponseLogger=D
EBUG, LogFile
log4j.additivity.org.apache.slide.webdav.WebdavServlet.requestResponseLogger
=false




Best regards

Juergen Pill

Re: request/response logging in Slide (server)

Posted by Remy Maucherat <re...@apache.org>.
> Hello,
>
> we have returned a new feature in Slide, which may be of interest for you:
> Server side request and response logging.
>
> This feature (if switched on) allows the server to log all the information
> in A XML format the request and response contain.
>
> To use this feature, either the SimpleLogger (default) or the
> log4j.Log4jLogger can be used. In the second case the output channel can
be
> a file, to seperate  "normal" logging from request/response logging.

That looks awesome, as it should dramatically improve the quality of bug
reports.

I'll ask Sam to add a dependency on JDOM to be able to build
XMLTestGenerator, and I'll add a compilation switch. I'm making the
necessary changes in the build scripts, and then I'll try it :)

Remy