/// <summary>
        /// Returns the value indicating whether a stack trace and/or the source file
        /// information should be gathered during layout processing.
        /// </summary>
        /// <returns>
        /// 0 - don't include stack trace<br/>1 - include stack trace without source file information<br/>2 - include full stack trace
        /// </returns>
        public int NeedsStackTrace()
        {
            int max = Layout.NeedsStackTrace();

            if (Header != null)
            {
                max = Math.Max(max, Header.NeedsStackTrace());
            }
            if (Footer != null)
            {
                max = Math.Max(max, Footer.NeedsStackTrace());
            }
            return(max);
        }