writing to event log in a custom process

I created a custom class for a process that does some basic manipulation to an HL7 message. I'd like to be able to write some debugging to the process event log. How would I do that?

I've tried ##class(Ens.Util.Trace).WriteTrace("system","HOSP.IHE.PDQProcess","MessageHeaderHandler","Discarding input message")

but I get a runtime error when I try that. I know this is pretty basic stuff, but any help would be appreciated.

  • 0
  • 0
  • 51
  • 1
  • 1

Answers

I knew I'd find it as soon as I posted. I just did a $$$LOGINFO("string")

If, as you mention the purpose of this logging is debugging, then I would recommend going with $$$TRACE vs. $$$LOGINFO. This will allow you to turn on and off tracing without making code changes. Whereas if you go with $$$LOGINFO it's always there unless you remove it (or comment it out), then you need to compile, and then if you need it once more...