[ http://issues.apache.org/jira/browse/IBATISNET-145?page=all ] Gilles Bayon closed IBATISNET-145: ----------------------------------
Fix Version: DataMapper 1.5 Resolution: Fixed in SVN > 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 > Fix For: DataMapper 1.5 > Attachments: LogManager_IBATISNET-145.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