You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by "Kuhns, John" <jk...@AimNTLS.com> on 2011/07/13 18:17:10 UTC
Access to the logger?
I would like to use the QueryLogger from within my data objects directly. Is this possible? If not, I suppose I write a custom superclass and refactor. Has anyone else done something like this?
Thanks,
John
RE: Access to the logger?
Posted by "Kuhns, John" <jk...@AimNTLS.com>.
Andrus,
Thanks, that works but doesn't give me quite what I need, I've written a custom superclass. Also, thanks for the clue on the upcoming change.
John
-----Original Message-----
From: Andrus Adamchik [mailto:andrus@objectstyle.org]
Sent: Wednesday, July 13, 2011 12:29 PM
To: user@cayenne.apache.org
Subject: Re: Access to the logger?
On Jul 13, 2011, at 7:17 PM, Kuhns, John wrote:
> I would like to use the QueryLogger from within my data objects directly. Is this possible? If not, I suppose I write a custom superclass and refactor. Has anyone else done something like this?
>
> Thanks,
> John
Hi there,
In Cayenne 3.0.x QueryLogger is a static public class. So surely any Java class can call its method.
Just as an FYI, In 3.1 QueryLogger is replaced with a non-static JdbcEventLogger managed via DI container.
Andrus
Re: Access to the logger?
Posted by Andrus Adamchik <an...@objectstyle.org>.
On Jul 13, 2011, at 7:17 PM, Kuhns, John wrote:
> I would like to use the QueryLogger from within my data objects directly. Is this possible? If not, I suppose I write a custom superclass and refactor. Has anyone else done something like this?
>
> Thanks,
> John
Hi there,
In Cayenne 3.0.x QueryLogger is a static public class. So surely any Java class can call its method.
Just as an FYI, In 3.1 QueryLogger is replaced with a non-static JdbcEventLogger managed via DI container.
Andrus