log4j

Tomcat application/catalina logs buffered on Vista, can't be tailed

I'm working on a Vista workstation purely out of stubbornness. Not that I like it, but it's what IT put on the machine when I arrived, and I'm determined to make it work somehow. I build a webapp and deploy it under Tomcat 5.5, starting it from the command line, not as a service. The problem is that the log files written by Tomcat and...

log4j with third-party-initialized JVM, multiple JAR files and Jython

I have a mess I would like to attach log4j logging to. Let me try to explain the process. Third-party application launches a JVM and loads Main.jar. Main.jar includes a properties file for log4j logging and code to read it in with a PropertyConfigurator. Logging in Main.jar works. Later, third-party application loads JythonApp.jar. Jyt...

Logging configuration for certain EJB Jar on JBoss Server

Hi, can you specify on JBoss server logging level for single EJB Jar? I've got two EJB Jars with two different Web Services. I would like the WS logs from first jar to be printed completely to server log file whereas WS logs from second jar are irrevelant and i don't want them printed anywhere. Can it be configured on JBoss? I'm using ...

configure log4j to log to custom file at runtime

Hi, Can anyone please guide me as to how I can configure log4j to log to a specific file that I specify at run-time.The name and path of the log file are generated at run-time and the application must log to that particular file. Generally file appender entries in the log4j.properties file points to the log file that will be used by th...

Where does the log file locate in a web application with log4j?

With the following settings: log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.maxFileSize=100KB log4j.appender.file.maxBackupIndex=5 log4j.appender.file.File=test.log log4j.appender.file.threshold=info log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d{AB...

How to configure logs/catalina.out of tomcat 6 for per-app. (Configure web-app specific log file for sys.out, sys.err)

Hi All, Requirement is this ... We have our 3 web-applications deployed in RHEL-5 server, we deployed apps with tomcat 6.0.16. We want to configure stdout, stderr, which are coming in tomcat/logs/catalina.out in app specific log file like, tomcat/logs/app1.log tomcat/logs/app2.log tomcat/logs/app3.log we are using log4j, but it is o...

Log4j configureAndWatch() spawning thousands of threads

So we have our J2EE application using Log4j like this public class CustomerController { private static Logger logger = Logger.getLogger(CustomerController.class); public CustomerService customerservice = null; public CustomerController() throws Exception { PropertyConfigurator.configureAndWatch("c:\log4j.p...

Log4J able to recover from disk full?

We have several java application server running here, with several apps. They all log with Log4J into the same file system, which we created only for that reason. From time to time it happens that the file system runs out of space and the app gets log4j:ERROR Failed to flush writer, java.io.I...

Using log4j in oc4j 10.1.3

I have a web application running on OC4J 10.1.3. I am trying to do some logging using log4j. The messages show up in my IDE console as expected, but nothing is going into the application.log in OC4J. Anybody know what I need to do to get this working? Here's my log4j.properties: log4j.rootCategory=DEBUG, CON1 # CON1 is set to be Co...

Log4j: Events appear in the wrong logfile

Hi there! To be able to log and trace some events I've added a LoggingHandler class to my java project. Inside this class I'm using two different log4j logger instances - one for logging an event and one for tracing an event into different files. The initialization block of the class looks like this: public void initialize() { System....

Logging to multiple syslog servers - log4j

Can I send logging information to multiple syslog servers? Our IT department has 2 syslog servers (for redundancy) and wants the application to log to both of them. Is adding 2 lines for syslog host going to work? I guess creating 2 separate syslog appenders (SYSLOG1, SYSLOG2) will work, but wanted to explore this path first...

Log4J Swing Appender

I need to append log4j content to a Swing component (JTextArea or similar). Is there a common way to do this? ...

Problem using log4j with axis2

Hi there, I created a webservice on axis2 and I used log4j for logging purposes. I'm getting the following error any time a request comes in for this WS: log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable. log4j:ERROR The class "org.apache.log4j.Appender" was loaded by l...

Does a web interface exist for configuring log4j?

I need a web interface for configure log4j that gives me: CRUD of loggers, appenders and filters when I am OK with the configuration I want to click and download an xml version of the configuration hierarchical view of the configured loggers which expands as needed (nice to have). I am aware of this old thread but I can't find the lo...

Java Logging framework with parsers generated ?

hi, I'm looking for a java logging framework which enables to declare your own grammar and automatically generates the associated parser. Ideally, I would like to use log4j and generates a parser and then be able to manipulate these logs as objects. I've seen there's a scanner generator for log4j based on events but no parser. I gue...

Log to a database using log4j

Since in log4j javadoc is WARNING: This version of JDBCAppender is very likely to be completely replaced in the future. Moreoever, it does not log exceptions. What should I do to log to a database? ...

Compare log4j and Logger

How does The JDK's Logger compare to Apache log4j? Which one is better for new projects that target Java 6? How do they compare in terms of flexibility and configurability? ...

How to use external log4j.properties for multiple projects?

Hi, I have a main project, which depends on multiple projects (in eclipse). At the end of the project, I will generate a runnable jar and a log4j.properties. This properties file is an external file, so my client can modify it at will (email address etc). runnable.jar + log4j.properties. At the same time, those projects which the mai...

JPA Instrumentation

Is it somehow possible to see the DDL produced when opening a EntityManagerFactory in JPA? I seem to be having some problems but no errors are produced. I don't see any sort of log file and no output is written to StdOut or StdErr. I have a log4j.properties in src/main/resources: log4j.appender.stdout=org.apache.log4j.ConsoleAppende...

How do I get more debug messages from Hibernate?

I haven't been able to get any more console output (to help with debugging) from Hibernate despite setting a few properties in the hibernate.cfg.xml file. For example, adding the line <property name="show_sql">true</property> did not, in fact, show SQL statements in the console. I've also tried playing around with the contents of the lo...