Apparently that's not the default behavior for log4net. You could do
something like this to ensure a log4net writes to the Console:

 XmlConfigurator.Configure();

 if (LogManager.GetRepository().GetAppenders().Length == 0)
 {
  ConsoleAppender consoleAppender = new ConsoleAppender();
  consoleAppender.Layout = new SimpleLayout();
  BasicConfigurator.Configure(consoleAppender);
 }

--- Richard Collette <[EMAIL PROTECTED]> wrote:

> I thought at one point I had read somewhere, perhaps in the Log4J
> docs, that when the logging file was not present, it would use a
> default logging configuration going to the standard output or
> console.  
>    
>   I have a command line program and when the app.config file for it
> is not present, I don't see any console logging.
>    
>   Advice?
>    
>   Thanks,
>   Rich
>    
> 

Reply via email to