Пример #1
0
        public static void Configure(string configFile = "")
        {
            if (string.IsNullOrEmpty(configFile))
            {
                var baseDirectory = LoggingUtility.GetBaseDirectory();
                configFile = Path.Combine(baseDirectory, $"dllconfigs\\Overt.Core.Logging.dll.config");
                if (!File.Exists(configFile))
                {
                    throw new Exception($"not exit the config file [{baseDirectory}]");
                }
            }

            LogManager.Configuration = new XmlLoggingConfiguration(configFile);
        }