Пример #1
0
        public MongoRepo(string dbName = "")
        {
            MongoHelper.SetInfos(dbName);

            if (_logMongoRepo != null)
            {
                return;
            }
            _logMongoRepo = LogManager.GetLogger(typeof(MongoRepo));

            XmlConfigurator.Configure();
            Logger.SetLevel("ParserLog", "DEBUG");

            Logger.AddAppender2(_logMongoRepo, Logger.CreateFileAppender("MongoRepoDebugAppender", "MongoRepo-Debug.txt", "debug"));
            Logger.AddAppender2(_logMongoRepo, Logger.CreateFileAppender("MongoRepoErrorAppender", "MongoRepo-Error.txt", "error"));
        }