On 29.12.01 05:46 Peter Donald <[EMAIL PROTECTED]> wrote:
>
> On Fri, 28 Dec 2001 02:26, Holger Faltinsky/Denic wrote:
> > Hi,
> >
> > one question regarding the server.xml (now the environment.xml):
> > [..]
> > <logs>
> >      <category name="" target="default" priority="DEBUG" />
> >      <category name="try" target="try-target" priority="DEBUG" />
> >
> >      <log-target name="default" location="/logs/socket.log" />
> >      <log-target name="try-target" location="/logs/try.log" />
> > </logs>
> > [..]
> > How is it possible to get access to the /logs/try.log-File?
> > If a Blockclass extends AbstractLoggable, "getLogger" is enough to get
> > access to the "default"-target. That works fine with the other blocks.
>
> A couple of things.
>
> You should be using AbstractLogEnabled (AbstractLoggable is deprecated).
>
> Every Block (that implements LogEnabled) gets a logger with a name equal
to
> Blocks name. SO if the blocks name is "foo" then it will get a logger
with
> category "foo". The categorys are hierarchial so if you have a block
named
> "foo" but don't declare a category named "foo" then it will inherit
settings
> from "" category. See the LogKit docs/website for more on this.
>
> Now the categorys in the above environment.xml file corespond to the
> categorys assigned to blocks. So if you wanted  to write to the
"try-target"
> target then you would create a category with same name as block and set
the
> target appropriately.
>
> WARNING: Last phoenix release had a bug in it that made prefixed named of
> category with application name. Latest CVS has this fixed. However if you
are
> working using last release and your application archive is blah.sar then
you
> will need to prefix all your categorys with "blah."
>
>
> Does this help?
>
Jo,

thanks for that. Most of the problems are really easy to solve.

Holger

>
> --
> Cheers,
>
> Pete
>
> *------------------------------------------------------*
> | "Common sense is the collection of prejudices        |
> |  acquired by age 18. " -Albert Einstein              |
> *------------------------------------------------------*
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to