[hibernate-dev] Tests asserting warnings get logged

Steve Ebersole steve at hibernate.org
Fri Mar 28 08:55:23 EDT 2014


On Mar 28, 2014 7:27 AM, "Hardy Ferentschik" <hardy at hibernate.org> wrote:
>
>
> On 28 Jan 2014, at 12:47, Steve Ebersole <steve at hibernate.org> wrote:
>
> > Given the problems using byteman is causing in CI
>
> What problem is that?

Port contention of some sort

>
> > and the fact that our
> > reliance on it is pretty light at the moment, I wanted to reach out for
> > some other ideas/proposals for ways to handle this testing requirement.
>
> The problem could be solved by a dynamic proxy. The proxy could
> be the middle man between the test (adding some test helpers and
assertions) and the actual Log implementation.
> Writing such a proxy should be straight forward, the problem is that
afaik there is not way
> in JBoss Logging to change the Log Implementation.
Logger.getMessageLogger just uses the name of the specified Log type
> and appends '$logger' and tries to load from the classpath.
>
> > I will also reach out to David and James to see if this is something
JBoss
> > Logging itself could help us tackle; maybe there is some feature there
> > already that would help.  Any other ideas/proposals?
>
> If they would add a way to specify a custom Log impl (e.g. via a system
property) things would become much easier.

They do.  But the only one I know of to easily swap is the backend, which
is maybe to "low", at that point you'd just be getting warn(...) or
debug(...) calls.  Ideally I'd like to see a way to intercept the
MessageLogger calls


More information about the hibernate-dev mailing list