Exemplo n.º 1
0
        private static LogEntry CreateLogEntry(Exception ex, Constants.Category c, Constants.Severity s, IDictionary <string, object> d = null)
        {
            LogEntry logentry = new LogEntry();

            logentry.Message  = ex.Message;
            logentry.Severity = MapToTraceEventType(s);
            logentry.Title    = c.ToString();
            return(logentry);
        }
Exemplo n.º 2
0
        /// <summary>
        /// For Audit Log with extended properties
        /// </summary>
        /// <param name="message"></param>
        /// <param name="c"></param>
        /// <param name="s"></param>
        /// <param name="d"></param>
        /// <returns></returns>
        private static LogEntry CreateLogEntryWithObject(string message, Constants.Category c, Constants.Severity s, IDictionary <string, object> d)
        {
            LogEntry logentry = new LogEntry();

            logentry.Message            = message;
            logentry.Severity           = MapToTraceEventType(s);
            logentry.Title              = c.ToString();
            logentry.ExtendedProperties = d;
            return(logentry);
        }