Questions tagged [log4j]

34 questions
69
votes
11 answers

How do I check if Log4j is installed on my server?

I have read about security vulnerabilities related to Log4j. How do I check if Log4j is installed on my server? My specific servers use Ubuntu 18.04.6 LTS. I have installed many third-party packages and maybe some of them contain it. Is there a…
Uri
  • 821
  • 1
  • 8
  • 15
7
votes
3 answers

Why do JBoss and Logrotate create log files full of NUL characters?

I've set up Logrotate to rotate my JBoss Application Server 4.2.2.GA logs nightly. After the log files have been rotated and JBoss starts writing to them again, the new log files begin with as many NUL characters as there were characters in the…
Ben Williams
  • 2,318
  • 4
  • 21
  • 17
4
votes
3 answers

How to combine logrotate with Log4j "rolling" file-appender?

We have a Java-application, that uses log4j and rotates its own logs daily: The currently-used log-file is /var/log/foo/foo.log It is moved into /var/log/foo/foo.log.YYYY-MM-dd when the day changes We'd rather not change its…
Mikhail T.
  • 2,272
  • 1
  • 22
  • 49
3
votes
1 answer

Parsing log4j log files with logstash

I am parsing multiline log4j logs with logstash and I've got the most curious problem. Here's an example of some related log entries: 2016-01-05 13:55:26,275 DEBUG [class] [thread] - bla 2016-01-05 13:55:26,275 DEBUG [class] [thread] -…
pour toi
  • 302
  • 1
  • 4
  • 12
3
votes
4 answers

Is there a way to throttle syslog

We use Log4J with its SyslogAppender to send messages to a central syslog-ng server, all running on Unix machines. Is there a way (whether that's in Java or in Unix) to throttle the number of messages that are sent in order to avoid an upset server…
Rich
  • 1,333
  • 5
  • 27
  • 39
3
votes
2 answers

JBoss: reload log4j config without restarting the server?

We are using JBoss application servers for our new web applications that use Apache log4j for logging. We are using JBoss for some months now and everything works out cool, the centralized config thing is really nice to work with. Also, as you may…
fgysin
  • 448
  • 2
  • 5
  • 15
3
votes
2 answers

Kafka stores log4j logs in directory literally called ${kafka.logs.dir}

I installed a preview version of Kafka 3.0 with log4j2 support (http://home.apache.org/~dongjin/post/apache-kafka-log4j2-support/) on a RHEL 8 server. Kafka and Zookeeper are running successfully as systemd user services. I set the environment…
2
votes
0 answers

Tomcat 8.5 Log To Syslog

I have found a tutorial for logging from tomcat to syslog using log4j: https://www.badllama.com/content/tomcat-7-logging-syslog-log4j Sadly this doesn't work anymore in tomcat 8.5. As stated in the comments of the documentation. Support for log4j…
BenjaminH
  • 121
  • 2
2
votes
1 answer

Apache log4j cloudstack log rotation archival policy

I am trying to limit the number of logs that are kept on my cloudstack management server. I am running log4j 1.2 and have recently added "" to my config (/etc/cloudstack/management/log4j-cloud.xml) to only…
Tom
  • 51
  • 1
  • 5
2
votes
0 answers

Generation of Tomcat Stdout and Stderr log files

Is there a way to catch tomcat stdout and tomcat stderr log files it to log4j or any other way so that i can keep track daily basis.These files are only generated when we restart tomcat.And i want these files to be generated automatically even…
user292771
  • 21
  • 1
2
votes
1 answer

%HOSTNAME% value is "unknown" in rsyslog template

The Gist Where does rsyslog get the value of %HOSTNAME% and under what conditions would "unknown" be the expected value? We're using rsyslog on an EC2 instance and we're trying to send our logs out to loggly. If I tail -f the log messages, I can…
D. Patrick
  • 131
  • 5
2
votes
2 answers

How to scan for log4j on Windows Server

I have a Windows Server 2012 R2 machine. What is the best way to search for log4j. Is it enough with a simple file search or can these files be used from inside a container. I have done a file search like this in power shell Get-childitem -Path c:\…
Jan Lauridsen
  • 123
  • 1
  • 5
1
vote
1 answer

Starting tomcat causes "java.io.FileNotFoundException: ../logs/dc.log (No such file or directory)" in catalina.out

I have been seeing this for literally years as part of tomcat apps, and now that I have gone through the steps to investigate it, I can't find the cause. Here's what I see whenever I start tomcat on CentOS servers running various applications: May…
DrStrangepork
  • 578
  • 1
  • 8
  • 18
1
vote
0 answers

Datastax Opscenter Agent installation is broken re: log4j

I am trying to install Opscenter, and datastax agent on our Cassandra cluster. When I start the datastax-agent, I am getting this error: log4j:WARN No appenders could be found for logger (org.eclipse.jetty.util.log). log4j:WARN Please initialize the…
1
vote
1 answer

Custom Event IDs Using NTEventLogAppender

This is my first post on ServerFault, but I love StackOverflow. I'm a coder, and as such I'm more comfortable in an IDE than in the registry, so I've come here for help. Problem: I have a chain of loggers CustomLogger (appends the log message with…
1
2 3