Skip to main content

Questions tagged [log4j2]

Log4j 2 is an upgrade to Log4j, a Java-based logging utility, that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements available in Logback while fixing some inherent problems in Logback's architecture.

log4j2
0 votes
0 answers
14 views

I'm trying to install Elasticsearch (8.10.2) on my Windows machine, but encountering errors related to plugin types and configuration mismatches

When starting Elasticsearch using elasticsearch.bat, I'm seeing the following errors related to plugin types: 2024-07-09 16:27:58,817 main ERROR Unable to locate plugin type for IfFileName 2024-07-09 ...
Sena's user avatar
  • 41
0 votes
1 answer
28 views

Limit API logs to Fewer Environments

I am in the process of sending my API logs from MuleSoft CloudHub to Datadog. I am able to send the logs by making the necessary changes to the application's log4j2.xml. We have several MuleSoft ...
Triumph Spitfire's user avatar
0 votes
1 answer
53 views

How to avoid outputting a lot of useless logs in log4j2?

I am moving a project from Weblogic into Tomcat, and I found that there is a problem of mixing log4j and log4j2 when the project is using Weblogic, but it runs normally in Weblogic and outputs the ...
chmod229's user avatar
1 vote
2 answers
65 views

getting deadlock with log4j

We are using log4j for logging purposes. We are using log4j 2.x through 1.2 bridge. Due to size of the application, we cannot upgrade to 2.x. Problem we are facing is that at the time of rollover, ...
phantom's user avatar
  • 73
0 votes
1 answer
38 views

Log4j2 pattern: Escape double-quotes in passed-down message values

We are using log4j2 in our microservices, which all have patterns that produce key-value pairs where values are enclosed in double-quotes so they can automatically be parsed by security tools (in fact,...
Christoph's user avatar
  • 2,279
0 votes
0 answers
37 views

Log4j2 Not write to log after I exported to .jar

I have a log4j2.xml which works correctly, until I export the project. The basePath in this case configured manually. So the log file location is correct even after export. After the exporting, just ...
Krisztofer Török's user avatar
0 votes
2 answers
75 views

Startup log4j2 ERROR Unrecognized conversion specifier and format specifier

In a project using maven, I have the same issue as described in log4j2 ERROR StatusLogger Unrecognized conversion specifier. But the problem persist even after implementing both solutions described in ...
Valentin Ruano's user avatar
-1 votes
0 answers
20 views

How to force org.hibernate.Query to use org.hibernate.type.NullableType?

This question is in response to my earlier question being closed - TRACE logging of org.hibernate.type not seen after changing from WARN to TRACE using Configurator.setLevel This is my test code: ...
user10931326's user avatar
2 votes
1 answer
45 views

How can I unit test whether my app logs as expected with log4j2?

I tried using reflection, but in my case sl4fj creates a final logger. This means I can't customize it. Any advice?
Geoff Langenderfer's user avatar
0 votes
0 answers
15 views

Delete old logs not working with log4j2 xml configuration

I have log4j2 xml configuration. Issue is that- log older than 1 day is not getting deleted. Log files are in same application root folder. Can anyone please help what is the issue <Configuration&...
Sachin's user avatar
  • 29
0 votes
1 answer
39 views

Lo4j2 class level logger's logging level not taking effect

I am bit confused why my log4j2 logging levels and appenders dont seem to work as I expect. Let me give the details. Project Structure: Main.java : package com.my.sample.MySampleProject; import org....
Sumit's user avatar
  • 868
0 votes
0 answers
21 views

How do I configure log4j2-elasticsearch-hc with ApiKey authorization?

I'm using Java 21, grade 8. I'm using properties configuration. Every configuration example I've found has not worked. The primary problem is the ApiKey authorization header requirement. I can't find ...
Tyler Jensen's user avatar
0 votes
1 answer
35 views

HTTP trace logging when using Spring Cloud Gateway in a SpringBoot fat JAR

We recently converted a Spring Boot application from a WAR running on Tomcat to a Spring Fat JAR. I would like the ability to record when an incoming HTTP request is recevied and when the response is ...
Bert Galbreath's user avatar
0 votes
1 answer
60 views

MDC not logged when using SLF4J and Log4J2

I'm trying to log MDC using a json formatter in a Wildfly application. I'm hoping to see all of the MDC keys and their values in each of the logs after setting the MDC values. I don't want to use ...
user1022022's user avatar
-1 votes
1 answer
28 views

Generate geoserver log as gelf

I'm trying to generate a secondary log appender in Geoserver in the GELF format, so I can export it to graylog, but I can't make the application to recognize the JsonTemplateLayout. Until now, I tryed:...
ebarbara's user avatar
  • 166

15 30 50 per page
1
2 3 4 5
298