Exemple #1
0
        /// <summary>
        /// 写运行日志
        /// </summary>
        /// <param name="data">日志内容</param>
        /// <param name="level">日志级别</param>
        /// <returns>true:成功;false:失败</returns>
        public override bool WriteRunningLog(RunningLogEventData data, int level)
        {
            if (level < this.logLevel)
            {
                return(true);
            }

            appender.WriteLog("Running", data.ToString());
            return(true);
        }
        /// <summary>
        /// 写运行日志
        /// </summary>
        /// <param name="data">日志内容</param>
        /// <param name="level">日志级别</param>
        /// <returns>true:成功;false:失败</returns>
        public override bool WriteRunningLog(RunningLogEventData data, int level)
        {
            if (level < this.logLevel)
            {
                return(true);
            }

            data.StationID = this.StationID;
            data.SystemID  = this.SystemID;

            return(RollingFileAppender.SimpleFileLog(PrepareFileName("", LogCategory.Running), data.ToString()));
        }