You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@infoplanning.com> on 2000/11/10 23:47:39 UTC

Deeper Avalon Integration

As an FYI, The Avalon logging mechanism and Command Line
Interpreter utilities are now integrated with Cocoon.

If you create a new class, and need access to the Cocoon
Logger, then you only have to do this:

import org.apache.log.Logger;
import org.apache.log.LogKit;

class MyClass {
    protected Logger log = LogKit.getLoggerFor("cocoon");

    public void myMethod() {
        log.info("Information");
        log.debug("Debug info");
        log.warn("Warning");
        log.error("Error");
        log.fatalError("Fatal Error");
    }
}

Note that each type of log signature will also accept a
Throwable as a second parameter.

At this time fatalError does not automatically shut down
the program.  That is a point of further development with
the Logger.

---------------------------------------
If you lust for Ham and Eggs, you have
committed breakfast in your heart
already.   -- C. S. Lewis


Re: Deeper Avalon Integration

Posted by Giacomo Pati <gi...@apache.org>.
Berin Loritsch wrote:
> 
> As an FYI, The Avalon logging mechanism and Command Line
> Interpreter utilities are now integrated with Cocoon.

Yes, a bunch of commited classes :))

> If you create a new class, and need access to the Cocoon
> Logger, then you only have to do this:
> 
> import org.apache.log.Logger;
> import org.apache.log.LogKit;
> 
> class MyClass {
>     protected Logger log = LogKit.getLoggerFor("cocoon");
> 
>     public void myMethod() {
>         log.info("Information");
>         log.debug("Debug info");
>         log.warn("Warning");
>         log.error("Error");
>         log.fatalError("Fatal Error");
>     }
> }
> 
> Note that each type of log signature will also accept a
> Throwable as a second parameter.
> 
> At this time fatalError does not automatically shut down
> the program.  That is a point of further development with
> the Logger.

Cool. I'll take a deeper look at the commit mail to see where it's been
integrated and available.

Thanks,

Giacomo


> 
> ---------------------------------------
> If you lust for Ham and Eggs, you have
> committed breakfast in your heart
> already.   -- C. S. Lewis