public LogEvent CreateEvent(string ipAddress, string user, string topic, LogEvent.LogEventType type)
		{
			lock (this)
			{
				LogEvent answer = new LogEvent(ipAddress, user, topic, type, Sink);
				return answer;
			}
		}
Example #2
0
		protected void StartPage()
		{
			if (Federation.GetPerformanceCounter(Federation.PerformanceCounterNames.TopicReads) != null)
				Federation.GetPerformanceCounter(Federation.PerformanceCounterNames.TopicReads).Increment();

			MainEvent = TheFederation.LogEventFactory.CreateAndStartEvent(Request.UserHostAddress, VisitorIdentityString, GetTopicName().ToString(), LogEvent.LogEventType.ReadTopic);
			VisitorEvent e = new VisitorEvent(GetTopicName(), VisitorEvent.Read, DateTime.Now);
			LogVisitorEvent(e);
		}
 public LogEvent CreateAndStartEvent(string ipAddress, string user, string topic, LogEventType type)
 {
     lock (_lock)
     {
         LogEvent answer = new LogEvent(ipAddress, user, topic, type, _sink);
         answer.Start();
         return answer;
     }
 }
 public void Log(LogEvent ev)
 {
     lock (this)
     {
         LogEventsForApplication(State).Add(ev);
         StreamWriter wr =  (StreamWriter)State["LogStream"];
         if (wr != null)
             ev.WriteToStream(wr);
     }
 }
Example #5
0
		protected void StartPage()
		{
			if (Federation.GetPerformanceCounter(PerformanceCounterNames.TopicsCompared) != null)
			{
				Federation.GetPerformanceCounter(PerformanceCounterNames.TopicsCompared).Increment();
			}

			_mainEvent = Federation.LogEventFactory.CreateAndStartEvent(Request.UserHostAddress, VisitorIdentityString, RequestedTopic.LocalName, LogEventType.CompareTopic);
			VisitorEvent e = new VisitorEvent(RequestedTopic, VisitorEvent.Compare, DateTime.Now);
			LogVisitorEvent(e);
		}