Ejemplo n.º 1
0
        /// <summary>
        /// Write a trace line with message and category.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="category">The category.</param>
        public static void WriteLine(string message, LogCategory category) {
#if DEBUG
            try {
                System.Diagnostics.Trace.WriteLine(message, category.GetDescription());
            } catch (StackOverflowException ex) {
                Console.WriteLine(ex);
            }
#else            
            if(category != LogCategory.Debug)
                System.Diagnostics.Trace.WriteLine(message, category.GetDescription());
#endif
        }