InitialiseUsingConfig() static private method

static private InitialiseUsingConfig ( ) : void
return void
コード例 #1
0
        /// <summary>
        /// Initialises <see cref="AppLogger"/> using the Aqueduct.Config file.
        /// </summary>
        /// <remarks>Uses the contents of the Diagnostics.Config setting to Initialise the logger</remarks>
        /// <remarks>To enable the intrelnal log debugging set Diagnostics.InternalDebugMode setting to true</remarks>
        public static void InitialiseFromConfig(string loggerName)
        {
            Log4NetInitialiser.InitialiseUsingConfig();
            Config.SettingsChanged += (sender, args) => { Log4NetInitialiser.InitialiseUsingConfig(); };

            if (string.IsNullOrEmpty(loggerName))
            {
                throw new ArgumentException("Logger name not specified.", "loggerName");
            }

            m_globalLogger = new Logger(loggerName);
        }