Skip to content
Advertisement

Tag: log4j

Unable to send the logs to Splunk Enterprise local using log4j2

I’m using log4j2 and splunk within java to send logs into my Splunk Enterprise HEC (HTTP Event Collector) Splunk Enterprise is running in my local machine. I’m doing all log4j2 configuration programmatically. (I know this is not the correct way to do this but I’m still doing this for learning purpose). I tried to send the logs into Splunk Enterprise

How to log output of just a specified framework class in Log4J

I need to log the output of a specific Spring class (org.springframework.core.log.LogFormatUtils) to a given appender (Graylog in the end, but I used a FileAppender for testing purposes – doesn’t matter here). I’m aware that generally, this could be done quite simple by using However, this does not work – it outputs nothing. If I change the logger’s name /

Log4j2 tomcat 10 memory leaks on shutdown

I have memory leaks at my tomcat 10.0.16 servlet application. I am using Log4j2 2.17.2 version, and after tomcat shutdown I see next logs: My pom.xml for Log4j2 is: And also log4j2 config Most common fix is to add log4j-jakarta-web, but this does not works for me Answer Fully deleting target folder and recompiling my project seems like resolved my

how to remove log4j form recursive dependency?

I was trying to remove the log4j dependency from my project which is a huge repository. After having a close look in gradle files I found one of the module refers to the log4j dependency, which I excluded in gradle as shown in below code – exclude group: ‘log4j’, module: ‘log4j’ After this, I ran a search for log4j jar,

How to set log4j 2.x output path after reading in log4j.xml

Say I have an appender defined in the log4j.xml file below. How could I change the value “/home/logs/oarm_log.txt” to a different value that comes from a string found in the actual Java code so that the code determines where to output the .txt file? Answer Though your best go-to resource for this would be Log4j’s official documentation, I will list

Log4j RollingFileAppender has odd behavior when using the Log4j 1.x bridge

While I migrate to log4j2, I have configured my Tomcat web application to use the Log4j 1.x bridge. I followed the Migration guide here: https://logging.apache.org/log4j/2.x/manual/migration.html I continue to use my existing log4j.properties file which look like this: This successfully creates my log file and rolls over at 10KB. I am having an issues that I can’t explain. Here are the

Advertisement