web stats
SumoLogic Logging - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 07-18-2017, 12:13 PM
ryandick ryandick is offline
What's HL7?
Join Date: Jan 2011
Posts: 2
ryandick is on a distinguished road
Default SumoLogic Logging

I'm attempting to configure MC 3.5 to use Sumo Logging. I have downloaded the sumo appender (sumo-log4j-appender version 2.4). The jar was first placed in custom-lib/, then I tried putting it in server-lib. mirth.log does not show any error messages when the server is restarted, but ./mcserver restart shows:

log4j:ERROR Could not instantiate class [com.sumologic.log4j.SumoLogicAppender].
java.lang.ClassNotFoundException: com.sumologic.log4j.SumoLogicAppender

No messages are communicated to Sumo. I am able to manually send a message with Postman.

Below are the settings in $mc-home/conf/log4j.properties:

log4j.rootLogger = INFO,stdout,fout,sumo

#Sumo Log appender
log4j.appender.sumo = com.sumologic.log4j.SumoLogicAppender
log4j.appender.sumo.layout = org.apache.log4j.PatternLayout
log4j.appender.sumo.layout.ConversionPattern = %-5p %d [%t] %c: %m%n
log4j.appender.sumo.url = https://my/unique/endpoint
log4j.appender.sumo.name = MirthLog

Has anyone had success getting the Sumo appender to work with log4j?
Reply With Quote
Old 02-03-2020, 03:17 PM
jwagoner jwagoner is offline
What's HL7?
Join Date: Feb 2020
Posts: 2
jwagoner is on a distinguished road

I am having this exact same problem. Did you ever find a solution?
Reply With Quote
Old 02-04-2020, 08:17 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road

This should be possible in 3.7 and later now, there's a new "server-launcher-lib" directory where libraries can be placed that are included on the root JVM classpath (so that the logger has access to them): MIRTH-3538
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.

- How do I foo?
- You just bar.
Reply With Quote
Old 02-04-2020, 12:02 PM
jwagoner jwagoner is offline
What's HL7?
Join Date: Feb 2020
Posts: 2
jwagoner is on a distinguished road

Thank You! I got some errors for missing dependencies but found some more advice on how to use maven-shade-plugin to generate one jar will all dependencies. It seems to be working now.
Reply With Quote

log4j, logging, sumo

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 05:05 AM.

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