Gang,

I am adding support for Appenders being created as services in bundles.
Due to the messiness required to get the Legacy APIs working, it is impossible 
to expose the Log4J classes needed for making Log4J appenders, so I am adding 
Pax Logging specific facade.

The interfaces can be seen below. The only interface that the "appender maker" 
is expected to implement is PaxAppender, and then register it with a NAME in 
the service registry. That NAME is what can be assigned to Loggers in the 
configuration file. Appenders that are defined this way, DO NOT receive 
configurations from the Log4J configuration file at all, and for now I will 
not specify how it should be done, i.e. appender implementation specific.

Someone here, already has custom appenders. Would this be good enough?


public interface PaxAppender 
{
    String getName();
    void doAppend( PaxLoggingEvent event );
}

public interface PaxLevel 
{
    boolean isGreaterOrEqual( PaxLevel r );
    int toInt();
    int getSyslogEquivalent();
}

public interface PaxLocationInfo 
{
    String getFileName();
    String getClassName();
    String getLineNumber();
    String getMethodName();
}

public interface PaxLoggingEvent 
{
    PaxLocationInfo getLocationInformation();
    PaxLevel getLevel();
    String getLoggerName();
    String getMessage();
    String getRenderedMessage();
    String getThreadName();
    String[] getThrowableStrRep();
    boolean locationInformationExists();
    long getTimeStamp();
    String getFQNOfLoggerClass();
}

Cheers
-- 
Niclas Hedhman, Software Developer

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to