public void LogTrace(NLog.Logger logger, string message, string data)
        {
            try
            {
                var logEvent = CreateLogEvent(LogLevel.Trace, logger.Name, message, null, data);

                logger.Log(logEvent);
            }
            catch
            {
            }
        }
 public void LogError2(NLog.Logger logger, string message, Exception ex)
 {
     try
     {
         var theEvent = CreateLogEvent(LogLevel.Error, logger.Name, message, ex, string.Empty);
         logger.Log(theEvent);
     }
     catch
     {
     }
 }