<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d13807087\x26blogName\x3djaxrpc\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://jaxrpc.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://jaxrpc.blogspot.com/\x26vt\x3d846299474934543371', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>
Web    Images    GroupsNew!    News    Froogle    more »
  Advanced Search
 Web Results 1 - 10 for jaxrpc[definition].  
« Home


How would I use JQuery to find a radio button by i...
Some JSTL Tips 1. How to iterate over a map in JST...
Challenge 1. How do you solve the timezone issue ...
To remove the ^M characters at the end of all line...
(This post requires Cleanup) Something I learned ...
Here is a simple directory command that list all y...
Control your hardware components! http://www.pbus-...
SQL to Select a random row from a database table
Here are the key differences between the upgrade a...
Found this articke on handling exceptions. Worth r...
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
February 2006
March 2006
April 2006
June 2006
August 2006
December 2006
August 2007
May 2008
February 2009
March 2010
August 2010
Java Podcast

Log4J Example

In many of my projects I implemented log4j as rootLogger instead of categorizing
them based on packages or by business modules
After reading through log4j manual many times, still Ididn't understand how to implement the logger categories and levels. Here is a working sample and troubleshooting in case you run into issues as I did.

## Sample log4j configuration specified in log4.properties
log4j.rootLogger=FATAL, stdout
log4j.logger.com.mycomp.local=WARN, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender
# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

#Sample code using this logger category
package com.mycomp.local;

import org.apache.log4j.Logger;
public class Sample1
private static Logger myLog = Logger.getLogger(Sample1.class);
public Sample1(){}
public static void main(String[] args) {
Enumeration enumList = LogManager.getCurrentLoggers();
Logger myLog = (Logger)enumList.nextElement();
System.out.println("Current Logger -" +myLog.getName() + "="+
myLog.debug("Inside debug1");
myLog.warn("Inside Warn1");


The important thing to note about the configuration is to specify appender.
Without the stdout appender in

log4j.logger.com.mycomp.local=WARN, stdout

The program would print DEBUG information even though root category is set to FATAL Give it a try!

- Sunday, March 19, 2006 -

Result Page: 




Search within results | Language Tools | Search Tips | Dissatisfied? Help us improve

Google Home - Blogger - Blogger Templates

© 2005 jaxrpc