Exemplo n.º 1
0
        public static void LogDebug(string message, string logger, int applicationId, string connectionKey = "", string auditId = "")
        {
            var result = new TraceContextDetail();

            try
            {
                result.SetSetttings(message, logger, applicationId.ToString(), connectionKey, auditId, Environment.StackTrace);

                SetMDC(result);

                var log = LogManager.GetLogger(logger);
                log.Debug(message);
            }
            catch { }
        }
Exemplo n.º 2
0
        public static TraceContextDetail LogInfo(string message, string logger, string applicationId, string connectionKey = "", string auditId = "")
        {
            var result = new TraceContextDetail();

            //try
            //{
            result.SetSetttings(message, logger, applicationId, connectionKey, auditId, Environment.StackTrace);

            SetMDC(result);

            var log = LogManager.GetLogger(logger);

            log.Info(message);
            //}
            //catch (Exception e)
            //{
            //	Debug.WriteLine(e.Message);
            //}

            return(result);
        }