示例#1
0
        public static void Log(this LogType logType, string message, params object[] args)
        {
            var formattedMessage = string.Format(message, args);
            var logMessage = new LogMessage
            {
                TraceId = ThreadLocalVariables.TraceId,
                MethodId = ThreadLocalVariables.MethodId,
                Timestamp = DateTime.Now,
                LogType = logType,
                Message = formattedMessage
            };

            logMessage.Broadcast();
        }
示例#2
0
文件: LogHub.cs 项目: csuzw/Tracer
 public void Send(LogMessage message)
 {
     Clients.All.broadcastLogMessage(message);
 }