Archive for the ‘Java/Java Frameworks’ Category

My Experience with Google AJAX toolkit

 
 
 
My first task at Mersoft was to develop an ajax-rich web interface with a Java backend. I was told that it must be tabbed and was shown the existing interface which pretty much was just a file upload. The project was to keep the file upload plus have several tabs containing different types of reports [...]

Problems with duplicate or multiple log messages using log4j xml

Are you seeing duplicate or multiple log messages using log4j xml configuration?
The configuration below produces three log messages.
log4j.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
  <appender name="console" class="org.apache.log4j.ConsoleAppender">
    <param name="Target" value="System.out" />
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%-5p %c{1} – %m%n" />
    </layout>
  </appender>
  <logger name="com.acme.LoggingTest">
    <level value="debug" />
    <appender-ref ref="console" />
  </logger>
  <logger name="com.acme">
    <level value="debug" />
    <appender-ref ref="console" />
  </logger>
  <root>
    <priority value="debug" />
    <appender-ref ref="console" />
  </root>
</log4j:configuration>

LoggingTest.java:

package com.acme;
public class LoggingTest {
  
  private [...]