Пример #1
0
        public void Debug(object obj, Exception exception)
        {
            string message = string.Format("{0}{1}{2}", obj == null ? "" : obj.ToString(), Environment.NewLine, ExceptionRender.Parse(exception));

            _logger.Log(NLog.LogLevel.Debug, exception, message);
        }
Пример #2
0
        private void Log(TLogLevel level, object obj, Exception exception)
        {
            string message = string.Format("{0}{1}{2}",
                                           obj == null ? "" : obj.ToString(), Environment.NewLine, ExceptionRender.Parse(exception));

            _logger.Log(level.ToNLogLogLevel(), exception, message);
        }