예제 #1
0
        public static StreamLogDetails GetStreamLogDetails(string streamIdentifier)
        {
            if (!streamLogs.ContainsKey(streamIdentifier))
                streamLogs[streamIdentifier] = new StreamLogDetails();

            return streamLogs[streamIdentifier];
        }
예제 #2
0
        public static StreamLogDetails GetStreamLogDetails(string streamIdentifier)
        {
            if (!streamLogs.ContainsKey(streamIdentifier))
            {
                streamLogs[streamIdentifier] = new StreamLogDetails();
            }

            return(streamLogs[streamIdentifier]);
        }
예제 #3
0
        private static void WriteLogHeader(string streamIdentifier, LogLevel level, string message, params object[] args)
        {
            if (!streamLogs.ContainsKey(streamIdentifier))
            {
                streamLogs[streamIdentifier] = new StreamLogDetails();
            }
            else
            {
                streamLogs[streamIdentifier].FullLog.AppendLine();
            }
            streamLogs[streamIdentifier].FullLog.AppendFormat("{0:HH:mm:ss.fffff} {1,5}: ", DateTime.Now, Enum.GetName(typeof(LogLevel), level).ToUpperInvariant());

            if (level >= LogLevel.Error)
            {
                streamLogs[streamIdentifier].LastError = String.Format(message, args);
            }
        }
예제 #4
0
        private static void WriteLogHeader(string streamIdentifier, LogLevel level, string message, params object[] args)
        {
            if (!streamLogs.ContainsKey(streamIdentifier))
                streamLogs[streamIdentifier] = new StreamLogDetails();
            else
                streamLogs[streamIdentifier].FullLog.AppendLine();
            streamLogs[streamIdentifier].FullLog.AppendFormat("{0:HH:mm:ss.fffff} {1,5}: ", DateTime.Now, Enum.GetName(typeof(LogLevel), level).ToUpperInvariant());

            if (level >= LogLevel.Error)
                streamLogs[streamIdentifier].LastError = String.Format(message, args);
        }