Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [log4j]

The tag has no usage guidance.

0
votes
0answers
25 views

Unable to log machine's fqdn instead of “localhost” from java program

I am currently using log4j library in java to post logs onto syslog but those logs always show "localhost" for hostname instead of the device's actual name. This only happens when i send log from my ...
0
votes
1answer
26 views

Appending new lines in Tomcat Catalina log rotate

Application running on Tomcat is using log4j for some unknown reason is appending (randomly) new log lines somewhere in the middle of the log file log4j.properites looks like: log4j.rootLogger=INFO, ...
0
votes
0answers
25 views

Logs are not deleted and compressed in elasticsearch nodes

I have log4j.property file and logrotate.d files. i have written log4j is rotating the logs based on configuration and logrotate is compress/delete the logs based on configuration. log4j is working ...
1
vote
0answers
922 views

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 ...
3
votes
3answers
2k views

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 ...
1
vote
1answer
229 views

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 "<param name="MaxBackupIndex" value="31"/>" to my config (...
0
votes
0answers
568 views

configure java.util.logging logging.properties to write app logs with systemd

I am charged with making migrating an app from centos 5.5 to centos 7.2. I can start my tomcat app using systemd but the app's log file is not being written to /home/tomcat where people expect it to ...
2
votes
1answer
5k views

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 ...
0
votes
1answer
2k views

Is there log4net pattern format logs viewer?

Do you know a good free log viewer for existing log4net log files that were written using PatternLayout format? I've found: LegitLogViewer (probably it is possible to configure that one) YALV!(xml) ...
2
votes
0answers
698 views

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 ...
0
votes
1answer
970 views

Switching Log4j mode to DEBUG in Weblogic Server

I am using weblogic 10.5 and my application has 4 managed servers, having the below mentioned configuration in weblogic startup script to enable log4j. JAVA_PROPERTIES="${JAVA_PROPERTIES} -Dlog4j....
1
vote
1answer
8k views

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 ...
1
vote
0answers
173 views

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....
2
votes
1answer
490 views

%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 ...
0
votes
1answer
58 views

Logging not getting disabled

Out Tomcat 8 is logging so much so that by the evening the catalina.out inflates to GBs of data. I followed the procedure given on the tomcat website to replace JULI logging with LOG4J. Now LOG4J has ...
1
vote
1answer
613 views

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 ...
3
votes
4answers
2k views

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 ...
3
votes
2answers
11k views

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 ...
0
votes
1answer
2k views

How to log all sql going through JBoss datasource with log4j

I've looked at log4jdbc (which does not support datasources), p6spy which seems to be what I am looking for but it has not been updated since 2003 which makes me nervous and lists only JBoss 3.x (we ...
7
votes
3answers
10k views

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 ...