You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org> on 2006/03/30 07:13:27 UTC

[jira] Commented: (IBATISNET-145) Make NoOpLoggerFA the default logger when logging config is missing or malformed. Allow FactoryAdapter to be set by the application

    [ http://issues.apache.org/jira/browse/IBATISNET-145?page=comments#action_12372375 ] 

Gilles Bayon commented on IBATISNET-145:
----------------------------------------

+1 for If there isn't a logger defined, I think the default behavior should be to use the NoOpLogger instead of the ConsoleLogger.

> Make NoOpLoggerFA the default logger when logging config is missing or malformed. Allow FactoryAdapter to be set by the application
> -----------------------------------------------------------------------------------------------------------------------------------
>
>          Key: IBATISNET-145
>          URL: http://issues.apache.org/jira/browse/IBATISNET-145
>      Project: iBatis for .NET
>         Type: Improvement
>     Versions: DataMapper 1.3
>     Reporter: Ron Grabowski
>     Assignee: Gilles Bayon
>     Priority: Minor
>  Attachments: LogManager_with_public_Adapter_property.patch
>
> I'm working on a project that uses 200 statements across 4 SqlMapper instances. Starting the program with DEBUG logging turned on generates about 62k of initialization log messages. Using Log4Net this takes about 1.4 seconds. Using the NoOpLogger it takes about 1.2 seconds.
> When the logging section is missing from the App.config file (or well-formed but missing the IBatisNet.Logging.Log4Net assembly) the application defaults to the ConsoleLogger and the application takes over 15 seconds to initialize itself. The application is a .NET 1.1 WinForm.
> If there isn't a logger defined, I think the default behavior should be to use the NoOpLogger instead of the ConsoleLogger. Perhaps we can add an additional property to the LogManager called Implementation (inspired by Sooda.Logging.LogManager) or FactoryAdapter so the implementation can be specified by the application:
> if (isWinForm)
> {
>  if (LogManager.FactoryAdapter is ConsoleOutLoggerFA)
>  {
>  // WinForms don't usually redirect the Console.Out...the logging config is probably missing or misconfigured
>  LogManager.FactoryAdapter = new NoOpLoggerFA(); 
>  }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira