Announcement

Collapse
No announcement yet.

using logger.info

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • using logger.info

    I am trying how to figure out how to put debugging in my code. It appears that the logger.info is what I need to set up.

    From the forum messages that I have viewed it looks like I need to edit the /mirth/conf/log4j.properties file.


    Then I need to add the line

    log4j.logger.transformer=INFO

    Then restart mirth.

    To use in my code I would put a line in my code such as the following???

    logger.info("Debug code: " + "PID value is" + msg'[PID']['PID.4']'[PID.4.1']);

    Then will my debug code show up in the server log tab on the Dashboard???

    Am I missing anything?

  • #2
    As far as I can see, this should work.
    JJ Mouris
    FFE Luxembourg
    IT-Department

    Comment


    • #3
      Only thing I see wrong in this part unless it is typo:
      msg'[PID']['PID.4']'[PID.4.1'])

      Correct should be:
      msg['PID']['PID.4']'[PID.4.1'])

      Instead of testing with msg, why not simply put this line in the code and then run and see if it works:

      logger.info("Hello world");
      Last edited by leaflet; 10-03-2010, 11:45 AM.

      Comment


      • #4
        Should work, but if you keep having issues try using logger.error

        Comment


        • #5
          Note that you set the logging level for the transformer class only. You didn't mention where exactly it is that you're doing the logging, but if it's somewhere outside of the transformers, you probably won't see your information being logged out. Most of the different logging entries in that file are class-specific. If you want to set the logging level for *all* of Mirth Connect, alter the following entry:

          log4j.rootCategory=INFO, stdout, fout

          That is the entry that the Mirth Connect Server Manager sets when you alter the logging level there (Windows only).

          Comment

          Working...
          X