From: Shrock, C. <Sh...@in...> - 2005-03-29 16:26:25
|
You need to tell log4j where it's config file is; and that is done when you start the process: java -Dlog4j.configuration=log4j.xml -jar sendAndReceive.jar -----Original Message----- From: fan yue [mailto:fan...@ho...] Sent: Tuesday, March 29, 2005 12:01 AM To: Bry...@uh...; hl7...@li... Cc: fan...@ho... Subject: [HAPI-devel] HAPI Logging Hello, I have implemented a class in which the method 'sendAndReceive' of Initiator class is called. I always got a message, in my IDE console, like this, log4j:WARN No appenders could be found for logger (ca.uhn.hl7v2.app.Initiator). log4j:WARN Please initialize the log4j system properly. Do I need to do extra configuration to make log4j work? Because currently the logging system does not work. Also I notice in the 'sendAndReceive' method, two HapiLog objects are instantiated like this HapiLog rawOutbound = HapiLogFactory.getHapiLog("ca.uhn.hl7v2.raw.outbound"); HapiLog rawInbound = HapiLogFactory.getHapiLog("ca.uhn.hl7v2.raw.inbound"); But under the installation directory of my HAPI, I could not find directory 'raw', I wonder what it is used for and whether my copy of HAPI is correct and complete. Thank you, Sarah >From: "Tripp, Bryan" <Bry...@uh...> >To: "fan yue" <fan...@ho...>,<hl7...@li...> >Subject: RE: [HAPI-devel] Building message >Date: Tue, 22 Feb 2005 10:47:15 -0500 > >Hi Sarah, > >Yes, like this ... > >//1. create a Message object with the structure you need, e.g. ADT_A01 >ADT_A01 message = new ADT_A01(); > >//2. Set its values using getters/setters >message.getMSH().getSendingApplication().getNamespaceID().setValue("my >app"); > >// ... or using Terser ... >Terser terser = new Terser(message); >terser.set("/MSH-3-1", "my app"); > >//3. Encode the message using a Parser >PipeParser parser = new PipeParser(); >String encodedMessage = parser.encode(message); > >//4. Then you can send it somewhere >Connection conn = new Connection(parser, new MinLowerLayerProtocol(), >new Socket(host, port)); Message response = >conn.getInitiator().sendAndReceive(message); > >Bryan > >-----Original Message----- >From: hl7...@li... on behalf of fan yue >Sent: Tue 2/22/2005 1:47 AM >To: hl7...@li... >Subject: [HAPI-devel] Building message > >Hi, > >I just started using HAPI and am not very farmiliar with it. My >question is, except for parsing an HL7 message, can we also build or >construct an >HL7 message using HAPI? Which package should I look into? > >Thank you very much, > >Sarah > > > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide Read honest & candid >reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >Hl7api-devel mailing list >Hl7...@li... >https://lists.sourceforge.net/lists/listinfo/hl7api-devel > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Hl7api-devel mailing list Hl7...@li... https://lists.sourceforge.net/lists/listinfo/hl7api-devel |
From: Dayu H. <da...@st...> - 2014-05-29 14:18:04
|
Hello Just wonder if HAPI has any logging, if yes, how to turn it on. Thanks Dayu -- Dayu Han Software Developer Strata Health Solutions Phone: +1 403 261 0855 ext 2102 www.stratahealth.com |
From: James A. <ja...@ja...> - 2014-05-29 15:28:58
|
Hi Dayu, HAPI uses SLF4j ( http://www.slf4j.org/ ) for logging. SLF4j is a facade framework which forwards logging to an underlying framework, such as LOG4j or Logback. The easiest way to get started with logging is to just add a logback JAR to your classpath. If you're already using a specific framework, you just need to add the appropriate SLF4j adapter JAR. Cheers, James On Thu, May 29, 2014 at 9:17 AM, Dayu Han <da...@st...> wrote: > Hello > > Just wonder if HAPI has any logging, if yes, how to turn it on. > > Thanks > Dayu > -- > Dayu Han > Software Developer > Strata Health Solutions > Phone: +1 403 261 0855 ext 2102 > www.stratahealth.com > > > > > > > > > > > > > ------------------------------------------------------------------------------ > Time is money. Stop wasting it! Get your web API in 5 minutes. > www.restlet.com/download > http://p.sf.net/sfu/restlet > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Dayu H. <da...@st...> - 2014-05-29 15:32:08
|
Thanks for the reply, James. I should have been more specific in the first place. We use HAPI 1.x, not HAPI 2.x, I wonder if HAPI takes the same approach in both releases. Dayu On May 29, 2014, at 9:28 AM, James Agnew <ja...@ja...> wrote: > Hi Dayu, > > HAPI uses SLF4j ( http://www.slf4j.org/ ) for logging. SLF4j is a facade framework which forwards logging to an underlying framework, such as LOG4j or Logback. > > The easiest way to get started with logging is to just add a logback JAR to your classpath. If you're already using a specific framework, you just need to add the appropriate SLF4j adapter JAR. > > Cheers, > James > > > On Thu, May 29, 2014 at 9:17 AM, Dayu Han <da...@st...> wrote: > Hello > > Just wonder if HAPI has any logging, if yes, how to turn it on. > > Thanks > Dayu > -- > Dayu Han > Software Developer > Strata Health Solutions > Phone: +1 403 261 0855 ext 2102 > www.stratahealth.com > > > > > > > > > > > > ------------------------------------------------------------------------------ > Time is money. Stop wasting it! Get your web API in 5 minutes. > www.restlet.com/download > http://p.sf.net/sfu/restlet > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > -- Dayu Han Software Developer Strata Health Solutions Phone: +1 403 261 0855 ext 2102 www.stratahealth.com |
From: James A. <ja...@ja...> - 2014-05-29 21:25:49
|
Hi Dayu. 1.x uses Commons-logging instead of SLF4j, but the general principal is the same. If you add log4j to your classpath (I'm not positive but I don't think C-L supports Logback as a backing library) it should automatically get picked up and start logging. In fact, I think commons-logging defaults to logging to the console even without a backing library. Cheers, James On Thu, May 29, 2014 at 11:31 AM, Dayu Han <da...@st...> wrote: > Thanks for the reply, James. I should have been more specific in the first > place. We use HAPI 1.x, not HAPI 2.x, I wonder if HAPI takes the same > approach in both releases. > > Dayu > > On May 29, 2014, at 9:28 AM, James Agnew <ja...@ja...> wrote: > > Hi Dayu, > > HAPI uses SLF4j ( http://www.slf4j.org/ ) for logging. SLF4j is a facade > framework which forwards logging to an underlying framework, such as LOG4j > or Logback. > > The easiest way to get started with logging is to just add a logback JAR > to your classpath. If you're already using a specific framework, you just > need to add the appropriate SLF4j adapter JAR. > > Cheers, > James > > > On Thu, May 29, 2014 at 9:17 AM, Dayu Han <da...@st...> wrote: > >> Hello >> >> Just wonder if HAPI has any logging, if yes, how to turn it on. >> >> Thanks >> Dayu >> -- >> Dayu Han >> Software Developer >> Strata Health Solutions >> Phone: +1 403 261 0855 ext 2102 >> www.stratahealth.com >> >> >> >> >> >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Time is money. Stop wasting it! Get your web API in 5 minutes. >> www.restlet.com/download >> http://p.sf.net/sfu/restlet >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > > -- > Dayu Han > Software Developer > Strata Health Solutions > Phone: +1 403 261 0855 ext 2102 > www.stratahealth.com > > > > > > > > > > > |
From: fan y. <fan...@ho...> - 2005-03-30 04:06:36
|
Shrock, Thanks for that. But the following problem is still there, >Also I notice in the 'sendAndReceive' method, two HapiLog objects are >instantiated like this > > HapiLog rawOutbound = >HapiLogFactory.getHapiLog("ca.uhn.hl7v2.raw.outbound"); > HapiLog rawInbound = >HapiLogFactory.getHapiLog("ca.uhn.hl7v2.raw.inbound"); > >But under the installation directory of my HAPI, I could not find directory >'raw', I wonder what it is used for and whether my copy of HAPI is correct >and complete. Does anyone know the answer? I am waiting for it... Thank you, Sarah >From: "Shrock, Court" <Sh...@in...> >To: 'fan yue' <fan...@ho...>, Bry...@uh..., hl7...@li... >Subject: RE: [HAPI-devel] HAPI Logging >Date: Tue, 29 Mar 2005 08:26:11 -0800 > >You need to tell log4j where it's config file is; and that is done when you >start the process: >java -Dlog4j.configuration=log4j.xml -jar sendAndReceive.jar > >-----Original Message----- >From: fan yue [mailto:fan...@ho...] >Sent: Tuesday, March 29, 2005 12:01 AM >To: Bry...@uh...; hl7...@li... >Cc: fan...@ho... >Subject: [HAPI-devel] HAPI Logging > >Hello, > >I have implemented a class in which the method 'sendAndReceive' of Initiator >class is called. I always got a message, in my IDE console, like this, > >log4j:WARN No appenders could be found for logger >(ca.uhn.hl7v2.app.Initiator). >log4j:WARN Please initialize the log4j system properly. > >Do I need to do extra configuration to make log4j work? Because currently >the logging system does not work. > >Also I notice in the 'sendAndReceive' method, two HapiLog objects are >instantiated like this > > HapiLog rawOutbound = >HapiLogFactory.getHapiLog("ca.uhn.hl7v2.raw.outbound"); > HapiLog rawInbound = >HapiLogFactory.getHapiLog("ca.uhn.hl7v2.raw.inbound"); > >But under the installation directory of my HAPI, I could not find directory >'raw', I wonder what it is used for and whether my copy of HAPI is correct >and complete. > >Thank you, > >Sarah > > >From: "Tripp, Bryan" <Bry...@uh...> > >To: "fan yue" ><fan...@ho...>,<hl7...@li...> > >Subject: RE: [HAPI-devel] Building message > >Date: Tue, 22 Feb 2005 10:47:15 -0500 > > > >Hi Sarah, > > > >Yes, like this ... > > > >//1. create a Message object with the structure you need, e.g. ADT_A01 > >ADT_A01 message = new ADT_A01(); > > > >//2. Set its values using getters/setters > >message.getMSH().getSendingApplication().getNamespaceID().setValue("my > >app"); > > > >// ... or using Terser ... > >Terser terser = new Terser(message); > >terser.set("/MSH-3-1", "my app"); > > > >//3. Encode the message using a Parser > >PipeParser parser = new PipeParser(); > >String encodedMessage = parser.encode(message); > > > >//4. Then you can send it somewhere > >Connection conn = new Connection(parser, new MinLowerLayerProtocol(), > >new Socket(host, port)); Message response = > >conn.getInitiator().sendAndReceive(message); > > > >Bryan > > > >-----Original Message----- > >From: hl7...@li... on behalf of fan yue > >Sent: Tue 2/22/2005 1:47 AM > >To: hl7...@li... > >Subject: [HAPI-devel] Building message > > > >Hi, > > > >I just started using HAPI and am not very farmiliar with it. My > >question is, except for parsing an HL7 message, can we also build or > >construct an > >HL7 message using HAPI? Which package should I look into? > > > >Thank you very much, > > > >Sarah > > > > > > > > > >------------------------------------------------------- > >SF email is sponsored by - The IT Product Guide Read honest & candid > >reviews on hundreds of IT Products from real users. > >Discover which products truly live up to the hype. Start reading now. > >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > >_______________________________________________ > >Hl7api-devel mailing list > >Hl7...@li... > >https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > > > > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide Read honest & candid reviews >on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >Hl7api-devel mailing list >Hl7...@li... >https://lists.sourceforge.net/lists/listinfo/hl7api-devel |
From: Tom Le <to...@te...> - 2005-03-30 04:21:25
|
From the method call and doc, the parameter is a logical name for a log file. I think!!! fan yue wrote: > Shrock, > > Thanks for that. But the following problem is still there, > >> Also I notice in the 'sendAndReceive' method, two HapiLog objects are >> instantiated like this >> >> HapiLog rawOutbound = >> HapiLogFactory.getHapiLog("ca.uhn.hl7v2.raw.outbound"); >> HapiLog rawInbound = >> HapiLogFactory.getHapiLog("ca.uhn.hl7v2.raw.inbound"); >> >> But under the installation directory of my HAPI, I could not find > > directory > >> 'raw', I wonder what it is used for and whether my copy of HAPI is >> correct >> and complete. > > > Does anyone know the answer? I am waiting for it... > > Thank you, > > Sarah > > >> From: "Shrock, Court" <Sh...@in...> >> To: 'fan yue' <fan...@ho...>, Bry...@uh..., > > hl7...@li... > >> Subject: RE: [HAPI-devel] HAPI Logging >> Date: Tue, 29 Mar 2005 08:26:11 -0800 >> >> You need to tell log4j where it's config file is; and that is done when > > you > >> start the process: >> java -Dlog4j.configuration=log4j.xml -jar sendAndReceive.jar >> >> -----Original Message----- >> From: fan yue [mailto:fan...@ho...] >> Sent: Tuesday, March 29, 2005 12:01 AM >> To: Bry...@uh...; hl7...@li... >> Cc: fan...@ho... >> Subject: [HAPI-devel] HAPI Logging >> >> Hello, >> >> I have implemented a class in which the method 'sendAndReceive' of > > Initiator > >> class is called. I always got a message, in my IDE console, like this, >> >> log4j:WARN No appenders could be found for logger >> (ca.uhn.hl7v2.app.Initiator). >> log4j:WARN Please initialize the log4j system properly. >> >> Do I need to do extra configuration to make log4j work? Because >> currently >> the logging system does not work. >> >> Also I notice in the 'sendAndReceive' method, two HapiLog objects are >> instantiated like this >> >> HapiLog rawOutbound = >> HapiLogFactory.getHapiLog("ca.uhn.hl7v2.raw.outbound"); >> HapiLog rawInbound = >> HapiLogFactory.getHapiLog("ca.uhn.hl7v2.raw.inbound"); >> >> But under the installation directory of my HAPI, I could not find > > directory > >> 'raw', I wonder what it is used for and whether my copy of HAPI is >> correct >> and complete. >> >> Thank you, >> >> Sarah >> >> >From: "Tripp, Bryan" <Bry...@uh...> >> >To: "fan yue" >> <fan...@ho...>,<hl7...@li...> >> >Subject: RE: [HAPI-devel] Building message >> >Date: Tue, 22 Feb 2005 10:47:15 -0500 >> > >> >Hi Sarah, >> > >> >Yes, like this ... >> > >> >//1. create a Message object with the structure you need, e.g. ADT_A01 >> >ADT_A01 message = new ADT_A01(); >> > >> >//2. Set its values using getters/setters >> >message.getMSH().getSendingApplication().getNamespaceID().setValue("my >> >app"); >> > >> >// ... or using Terser ... >> >Terser terser = new Terser(message); >> >terser.set("/MSH-3-1", "my app"); >> > >> >//3. Encode the message using a Parser >> >PipeParser parser = new PipeParser(); >> >String encodedMessage = parser.encode(message); >> > >> >//4. Then you can send it somewhere >> >Connection conn = new Connection(parser, new MinLowerLayerProtocol(), >> >new Socket(host, port)); Message response = >> >conn.getInitiator().sendAndReceive(message); >> > >> >Bryan >> > >> >-----Original Message----- >> >From: hl7...@li... on behalf of fan yue >> >Sent: Tue 2/22/2005 1:47 AM >> >To: hl7...@li... >> >Subject: [HAPI-devel] Building message >> > >> >Hi, >> > >> >I just started using HAPI and am not very farmiliar with it. My >> >question is, except for parsing an HL7 message, can we also build or >> >construct an >> >HL7 message using HAPI? Which package should I look into? >> > >> >Thank you very much, >> > >> >Sarah >> > >> > >> > >> > >> >------------------------------------------------------- >> >SF email is sponsored by - The IT Product Guide Read honest & candid >> >reviews on hundreds of IT Products from real users. >> >Discover which products truly live up to the hype. Start reading now. >> >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> >_______________________________________________ >> >Hl7api-devel mailing list >> >Hl7...@li... >> >https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> > >> >> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide Read honest & candid > > reviews > >> on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > |