File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JBoss/WildFly and the fly likes log4j on server not logging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "log4j on server not logging" Watch "log4j on server not logging" New topic

log4j on server not logging

C Weaver

Joined: Jun 28, 2012
Posts: 6
Hello all,

I created a sample client call in eclipse with a wsdl service entry that points to my development jboss instance. This is not my localhost, it's the actual jboss running on a unix server. I added log4j logging and all works well. I get log entries in my log folder (not the same location as the server.log folder) when I make the call using my test client.

The issue is when a user makes a call. There is no log file created. Also, there are no errors in any of the JBoss logs.

If I'm hitting the same exact war file on my development (unix) server, how come I get logs and nobody else can? They are using soapUI to generate the call and I'm using a pojo client call.

Could it be some type of permissions issue? The folder where the log file is being written to has full permissions, so I'm stumped.

Please help.

Peter Johnson

Joined: May 14, 2008
Posts: 5852

Are you absolutely, positively, certain that you are using the same URL that the other user is using?

The only two reasons I can think of:
a) the web service you are calling has logging turned on while the web server the other user is calling doesn't (check the logger settings in the log4j config file)
b) you are invoking a completely different application that the other user is, and each application is configured differently

My vote is with B. I've done that often enough...

By the way, which version of JBoss AS.

JBoss In Action
C Weaver

Joined: Jun 28, 2012
Posts: 6
Turns out it was a user (me) issue. I renamed the log file and added the current date to the end of the file. I wanted a fresh log to watch when the user hit our system. Turns out, JBoss does not like that very much. It found the log file and continues to log in the old file.

I thought it would just create a new log file when the old one was gone. Silly me.
I agree. Here's the link:
subject: log4j on server not logging
It's not a secret anymore!