I'm trying to put a wrapper around the Logging so
that I won't have to put log4j imports and declarations all over my code. I've
heard of other doing this but I'm not exactly sure how so I was hoping I could
get some pointers on what I've done so far.
Any help much appreciated.
----
package com.neuroquest.cais.log;
import org.apache.log4j.Category;
import org.apache.log4j.PropertyConfigurator; public class Logger extends Category {
static Category cat;
public Category getCat()
{
return cat; } public Logger(String name) { try
{
PropertyConfigurator.configure("rtlog.properties"); } catch (Exception e) { System.err.println("Could not open rtlog.properties"); } if (cat ==
null)
cat = Category.getInstance(name); }
} |
- Re: making a wrapper for log4j G.L. Grobe
- Re: making a wrapper for log4j Naresh Sharma
- Re: making a wrapper for log4j Don Taylor