Hi Sharon, you will need to make yourself familiar with commons logging and log4j.
http://commons.apache.org/logging/ http://logging.apache.org/log4j/ An example (requires log4j and commons logging in classpath): Create a log4j.properties file in your classpath: log4j.rootLogger=INFO, A1 log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%6r [%t] %5p %c %x %m%n log4j.logger.ca.uhn.hl7v2=INFO log4j.logger.ca.uhn.hl7v2.raw.inbound=ERROR log4j.logger.ca.uhn.hl7v2.raw.outbound=ERROR This logs HAPIs activities to the console (adjust to your needs, e.g. log to file) in INFO mode, except the raw messages, which are not displayed, except an error occurs (I did this, because the Initiator also logs the messages, so I dont see them twice). Turn to DEBUG to see parsing of messages and a lot more information. How to configure basically has nothing to do with HAPI itself, as it uses commons logging, so you should go ahead and read on the logging/log4j tutorials and howtos :-) Greets Torben Sharon Carter schrieb: > I would really appreciate some more detailed info about how the > logging works in Hapi. I've only used Java logging recently so I don't > have a massive amount of experience in this area. > > We are using the HAPI library in an application for viewing HL7 > messages. We have created custom versions of the various message > classes and would like to make use of the logging facility. > > I don't understand how we set up our application so that we can log > the HAPI message to a file and control what level of logging is used > etc. I can see within the HAPI source files the folder 'conf' which > contains logging.properties and log4j.xml but I don't know how to > configure this so that when we use the library within our own app we > can access the messages logged by HAPI. > > Any help would be most appreciated! > > Thanks, > Sharon > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Hl7api-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/hl7api-devel ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Hl7api-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hl7api-devel

