From: Clayton H. <dr...@us...> - 2004-07-25 19:02:59
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31144/src/ICSharpCode.Console/SharpCvsLib Modified Files: Main.cs Log Message: Fixed bug in log4net assembly loader. Created temporary configuration file to load assembly from. Index: Main.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Main.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Main.cs 25 Jul 2004 17:38:02 -0000 1.9 --- Main.cs 25 Jul 2004 19:02:50 -0000 1.10 *************** *** 57,62 **** try { Assembly log4net = AssemblyHelper.LoadLog4Net(sharpcvslibConsole); ! } catch (Exception e) { ! System.Console.WriteLine(String.Format("Unable to load log4net: {0}.", e.Message)); } //Assembly log4net = AssemblyHelper.LoadAssembly(AssemblyHelper.LOG4NET); --- 57,62 ---- try { Assembly log4net = AssemblyHelper.LoadLog4Net(sharpcvslibConsole); ! } finally { ! // unable to load log4net, get on with it. } //Assembly log4net = AssemblyHelper.LoadAssembly(AssemblyHelper.LOG4NET); *************** *** 68,71 **** --- 68,73 ---- args = new string[1]; } + MethodInfo initLogger = console.GetType().GetMethod("InitLog4net", new Type[0]); + initLogger.Invoke(console, null); console.GetType().GetProperty("Args").SetValue(console, args, null); MethodInfo execute = console.GetType().GetMethod("Execute", new Type[0]); |