web stats
Custom JAR logs - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-20-2020, 07:48 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 280
AlexNeiva is on a distinguished road
Post Custom JAR logs

Hello,


I create a custom JAR to be invoked in Mirth Connect and works very well.
My question is, how can I show the logs from the custom JAR (when in execution) in the Mirth Dashboard?


Is that possible?



Thank you
__________________
Best Regards,
Alex Neiva
Reply With Quote
  #2  
Old 01-20-2020, 08:03 AM
odo odo is offline
OBX.3 Kenobi
 
Join Date: Feb 2017
Location: Luxembourg
Posts: 157
odo is on a distinguished road
Default

Yes:


Code:
import org.apache.log4j.Logger;
.
.
. 
Logger.getRootLogger().debug("YOUR MESSAGE HERE");
Reply With Quote
  #3  
Old 01-23-2020, 07:04 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 280
AlexNeiva is on a distinguished road
Default

Hello Odo,


thank you for your feedback.
Unfortunately it does not work since the JAR library does not implement such methods.
__________________
Best Regards,
Alex Neiva
Reply With Quote
  #4  
Old 01-23-2020, 09:24 AM
odo odo is offline
OBX.3 Kenobi
 
Join Date: Feb 2017
Location: Luxembourg
Posts: 157
odo is on a distinguished road
Default

Quote:
Originally Posted by AlexNeiva View Post
since the JAR library does not implement such methods.
Not sure what you mean by that?

You just have to include the log4j library. Then you call the line of code I wrote above and this should do the job. It is calling a static method on the Logger class of log4j (no need to implement any method)
Reply With Quote
Reply

Tags
custom jar logs, custom-lib, jar logs, log, logs

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:14 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation