예제 #1
0
        /// <summary>
        /// sends multiple logs as serialized json list of log
        /// </summary>
        /// <param name="logs"></param>
        /// <param name="serverUrl"></param>
        /// <param name="acceptSelfSigned"></param>
        public static void SendLogPackage(List <Log> logs, string serverUrl, bool acceptSelfSigned = true)
        {
            var logPak = JsonConvert.SerializeObject(logs, Formatting.Indented).Trim().
                         Replace(System.Environment.NewLine, "");
            var threadedLogSender = new ThreadedLogSender(logPak, serverUrl, acceptSelfSigned, senderEventName: "logPak");

            threadedLogSender.Send();
        }
예제 #2
0
        /// <summary>
        /// Sends an Log
        /// </summary>
        /// <param name="log">FnLog.LogWrap</param>
        /// <param name="serverUrl">serverUrl</param>
        /// <param name="acceptSelfSigned">acceptSelfSigned</param>
        public static void SendLog(Log log, string serverUrl, bool acceptSelfSigned = true)
        {
            var threadedLogSender = new ThreadedLogSender(log.Serialize(), serverUrl, acceptSelfSigned);

            threadedLogSender.Send();
        }