Example #1
0
 /// <summary>
 /// Log a message to the eFlow logger.
 /// </summary>
 /// <param name="severity">The severity of the message.</param>
 /// <param name="msg">The message to log.</param>
 /// <param name="stringFormat">The strings to format</param>
 public static void LogMsg(TiS.Core.eFlowAPI.TIS_SEVERITY severity, String msg, params object[] stringFormat)
 {
     try
     {
         if (stringFormat != null)
         {
             LogMsg(String.Format(msg ?? String.Empty, stringFormat), severity);
         }
         else
         {
             LogMsg(msg ?? String.Empty, severity);
         }
     }
     catch { }
 }
Example #2
0
        /// <summary>
        /// Log a message to the eFlow logger.
        /// </summary>
        /// <param name="message">The message to log.</param>
        /// <param name="severity">The severity of the message.</param>
        public static void LogMsg(String message, TiS.Core.eFlowAPI.TIS_SEVERITY severity)
        {
            if (OnLog != null)
            {
                OnLog(message, severity);
            }

            if (message != null && _logger != null)
            {
                String smsg = String.Format("[[{0}]] {1}", _src, message);

                _logger.RequestMessageLog(smsg, Path.GetFileNameWithoutExtension(Application.ExecutablePath), severity, 0, 0);
#if  DEBUG
                System.Diagnostics.Debug.WriteLine(smsg + ".  " + severity.ToString() + " - " + Path.GetFileNameWithoutExtension(Application.ExecutablePath));
#endif
            }
        }