Exemplo n.º 1
0
        /// <summary>
        ///  使用NLog 日志组件
        /// </summary>
        public static Spider UseNLog(this Spider spider)
        {
            spider.AddLogProvider(new NLogProvider());

            return(spider);
        }
Exemplo n.º 2
0
        /// <summary>
        ///  使用数据库存储日志
        /// </summary>
        public static Spider UseDataBaseLog(this Spider spider, ILoggerWriter loggerWriter)
        {
            spider.AddLogProvider(new LogProvider(loggerWriter));

            return(spider);
        }