public static void LogMessageUnprotectedError(ServiceMessage Msg) { Debug.WriteLine( "[" + GetFormattedTime(DateTime.Now) + "] " + string.Format("Error: Unencrypted message content from {0} Message ID {1} for resource {2} -- expected encrypted message \n", Msg.GetType().Name, Msg.Tag, Msg.Resource), "MESSAGING"); }
public static void LogNewMessage(ServiceMessage Msg) { if (Msg is ServiceRequest || Msg is GetTransferMessage) { Debug.WriteLine( "[" + GetFormattedTime(DateTime.Now) + "] " + string.Format("Received {0} Message ID {1} for resource {2} from {3}\n", Msg.GetType().Name, Msg.Tag, Msg.Resource, Msg.Source), "MESSAGING"); } else { Debug.WriteLine( "[" + GetFormattedTime(DateTime.Now) + "] " + string.Format("Received {0} Message ID {1} from {2}\n", Msg.GetType().Name, Msg.Tag, Msg.Source), "MESSAGING"); } }
public static void LogMessageError(ServiceMessage Msg, Exception ex) { Debug.WriteLine( "[" + GetFormattedTime(DateTime.Now) + "] " + string.Format("Error processing {0} Message ID {1} for resource {2}. Error Message {3} occured at {4}\n", Msg.GetType().Name, Msg.Tag, Msg.Resource, ex.Message, ex.StackTrace), "MESSAGING"); }