logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lilianne E. Blaze" <lilianne_bl...@tlen.pl>
Subject Re: Small patch for NTEventLogAppender
Date Fri, 12 Oct 2007 04:20:08 GMT
Looks like it's not enough. Is there any simple way to just tell maven
to skip the tests? There is an option in NB that says just that, but it
doesn't work. Probably having something to do with three different build
For now I just put that dll in %system% and it works, I'll look into it
later. To be honest, so far re-compiling log4j wasn't exactly

But, maybe you could consider something like my previous patch + the
following modification:

  static {
    try {
      _libLoaded = true;
    catch(java.lang.UnsatisfiedLinkError e) {
"warnOnly".equals(System.getProperty("log4j.nteventlog.failmode")) ) {
        _libLoaded = false;
      } else {
        throw e;


This way it behaves like before when the property is not set, and
silently swallows when it is.

Greetings, Lilianne E. Blaze

Curt Arnold wrote:
> On Oct 11, 2007, at 7:28 PM, Lilianne E. Blaze wrote:
>> Hello,
>> I had major problems getting Log4j compiled on Netbeans 6.0 / WinXP.
>> It was constantly bitching about lack of NTEventLogAppender.dll, even
>> when I did everything I could think of to turn off the tests during
>> compilation.
>> The patch below basically checks for the dll file, and if it's not found
>> emits a log-log warn and then silently swallows all events.
>> Could you please consider including it?
>> Or at least provide some instructions on how to disable that particular
>> test during the build?
> The behavior when deployed is much more critical that behavior in an
> IDE that making a change to make life in a particular IDE better isn't
> a compelling argument.  While not every decision was perfect, any
> change of behavior must be carefully considered as to the benefits
> that it offers users when deployed vs the potential for breaking some
> app that depends on the established behavior.
> Changes in the test suite or tests/build.xml have a much lower
> threshold as they don't affect deployed behavior.  Currently the
> tests/build.xml will skip the NTEventLogAppenderTest if the build is
> executed on a non-Windows platform.  You could modify tests/build.xml
> to skip that test if an arbitrary property is set, something like:
> -<target name="NTEventLogAppender" depends="build" if="is-windows">
> +<target name="NTEventLogAppender" depends="build" if="is-windows"
> unless="skip-nteventlogtest">
> If you set the skip-nteventlogtest property when you launch
> tests/build.xml, the test should be bypassed for you and you won't
> have to see the messages.  If that works for you, I'd have no problem
> with that going in.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message