directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <ole.er...@gmail.com>
Subject Re: [Testing] Embedded Logging Configuration
Date Wed, 13 Jun 2007 13:20:33 GMT
Emmanuel and PAM,

Thanks for the tips.  After doing a little more reading I found:

PropertyConfigurator.configure("log4j.properties");

I put it in the setUp and now the test is green.  I love green.  Hope to have a new testing
archetype checked in shortly.

Thanks again,
- Ole



Pierre-Arnaud Marcelot wrote:
> Hi Ole,
> 
> We're using this in Directory Studio.
> 
>     PropertyConfigurator.configure ( Platform.getBundle(
>     Application.PLUGIN_ID ).getResource( "log4j.conf" ) ); //$NON-NLS-1$
> 
> 
> Of course, don't use the Platform.getBundle().getResource() methods 
> since it a specific Eclipse one. Maybe you can try 
> YourClass.class.getResource().
> 
> Hope this help.
> 
> P-A M.
> 
> 
> On 6/13/07, *Emmanuel Lecharny* <elecharny@gmail.com 
> <mailto:elecharny@gmail.com>> wrote:
> 
>     Hi Ole,
> 
>     putting the log4j.properties in src/test/resources is not enough, if
>     the log system is not initialized.
> 
>     I don't have Ceki's book in my hotel room, but you can find the info
>     somwhere on the web (do'nt know where ...)
> 
>     Emmanuel
> 
>     On 6/13/07, Ole Ersoy < ole.ersoy@gmail.com
>     <mailto:ole.ersoy@gmail.com>> wrote:
>      > Hey Guys,
>      >
>      > I'm in the process of reworking the testing archetype.  When I
>     run the test for the setup, which starts the server, I get these lines:
>      >
>      > log4j:WARN No appenders could be found for logger
>     (org.apache.directory.server.core.DefaultDirectoryService).
>      > log4j:WARN Please initialize the nlog4j system properly.
>      >
>      > Does nlog4j have to be configured for the server to run
>     embedded?  Do we have any documentation on configuring it when
>     running embedded?  I saw the tests in apacheds-core-unit have the
>     log4j.properties file in /src/test/resources, so I tried putting it
>     there, but it's still coughing.  Thoughts?
>      >
>      > Thanks,
>      > - Ole
>      >
>      >
>      >
>      >
> 
> 
>     --
>     Regards,
>     Cordialement,
>     Emmanuel L├ęcharny
>     www.iktek.com <http://www.iktek.com>
> 
> 

Mime
View raw message