示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="entry"></param>
        /// <returns></returns>
        protected override object FormatEntry(ILogEntry entry)
        {
            var builder = new StringBuilder(512);

            if (string.IsNullOrEmpty(this.Header) == false)
            {
                builder.Append(FormatterUtility.Format(entry, this.Header));
            }

            if (string.IsNullOrEmpty(this.Content))
            {
                builder.Append(entry.ToText());
            }
            else
            {
                builder.Append(FormatterUtility.Format(entry, this.Content));
            }

            if (string.IsNullOrEmpty(this.Footer) == false)
            {
                builder.Append(FormatterUtility.Format(entry, this.Footer));
            }

            builder.Replace(@"\r\n", "\r\n");
            builder.Replace(@"\t", "\t");

            return(builder.ToString());
        }