private LogEventPublisherInternal InternalRegisterNewEvent(LogMessageAttributes attributes, string eventName, int stackTraceDepth, double messagesPerSecond, int burstLimit)
{
//Note: A race condition can cause more then the maximum number of entries to exist, however, this is not a concern.
if (m_lookupEventPublishers.Count > MaxDistinctEventPublisherCount)
{
if (m_excessivePublisherEventNames == null)
{
var owner1 = new LogEventPublisherDetails(m_publisherInstance.TypeData,
"Excessive Event Names: Event names for this publisher has been limited to " + MaxDistinctEventPublisherCount.ToString() +
"Please adjust MaxDistinctEventPublisherCount if this is not a bug and this publisher can truly create this many publishers.");
m_excessivePublisherEventNames = new LogEventPublisherInternal(attributes, owner1, m_publisherInstance, m_logger, stackTraceDepth, messagesPerSecond, burstLimit);
}
return m_excessivePublisherEventNames;
}
LogEventPublisherInternal publisher;
var owner = new LogEventPublisherDetails(m_publisherInstance.TypeData, eventName);
publisher = new LogEventPublisherInternal(attributes, owner, m_publisherInstance, m_logger, stackTraceDepth, messagesPerSecond, burstLimit);
publisher = m_lookupEventPublishers.GetOrAdd(Tuple.Create(attributes, eventName), publisher);
return publisher;
}