W3C home > Mailing lists > Public > www-jigsaw@w3.org > March to April 2003

Re: Logging inside filters...

From: Yves Lafon <ylafon@w3.org>
Date: Tue, 18 Mar 2003 22:54:22 +0100 (MET)
To: "Laird, Brian" <BLaird@perseco.com>
cc: www-jigsaw@w3.org
Message-ID: <Pine.GSO.4.53.0303182251220.16275@tarantula.inria.fr>

On Mon, 17 Mar 2003, Laird, Brian wrote:

>
> What is the recommended way of logging within custom built filters (ex:
> error logging)?  Is there an easy way to get a hook to the current
> logger?

From LogFilter:

            FramedResource target = (FramedResource) getTargetResource();
            if (target != null) {
                String msg = ("IO error while writing to log file \""+
                              ex.getMessage() + "\".");
                target.getServer().errlog(this, msg);
            }

You can get the Logger object with target.getServer().getLogger() and then
use the usual method on it.
Thanks,

-- 
Yves Lafon - W3C
"Baroula que barouleras, au tiéu toujou t'entourneras."
Received on Tuesday, 18 March 2003 16:54:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:36 GMT