Class EntLibLoggingProxyTraceListener
- Assembly
- Microsoft.Practices.EnterpriseLibrary.Logging.dll
Proxy listener for writing the log using the Logger class.
public class EntLibLoggingProxyTraceListener : TraceListener, IDisposable
- Inheritance
-
EntLibLoggingProxyTraceListener
- Implements
- Inherited Members
Constructors
EntLibLoggingProxyTraceListener()
public EntLibLoggingProxyTraceListener()
Properties
CategoriesXPathQueries
Gets the xpath queries for the categories.
public IList<string> CategoriesXPathQueries { get; }
Property Value
IsThreadSafe
Gets the value indicating the receiver is thread safe.
public override bool IsThreadSafe { get; }
Property Value
NamespaceManager
Gets the Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.EntLibLoggingProxyTraceListener.xmlNamespaceManager for the listenter.
public XmlNamespaceManager NamespaceManager { get; }
Property Value
- XmlNamespaceManager
The Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.EntLibLoggingProxyTraceListener.xmlNamespaceManager for the listenter.
Methods
GetSupportedAttributes()
Gets the supported attributes, namely "categoriesXPathQueries" and "namespaces".
protected override string[] GetSupportedAttributes()
Returns
- string[]
SplitNamespacesString(string)
Splits a namespace string.
public static IDictionary<string, string> SplitNamespacesString(string namespacesString)
Parameters
namespacesString
stringThe string to split.
Returns
- IDictionary<string, string>
The string split into keys and values.
SplitXPathQueriesString(string)
Splits the XPathQuery strings.
public static IList<string> SplitXPathQueriesString(string xpathsStrings)
Parameters
xpathsStrings
stringThe XPath queries.
Returns
TraceData(TraceEventCache, string, TraceEventType, int, object)
Writes trace information, a data object and event information through the Logging Application Block.
public override void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, object data)
Parameters
eventCache
TraceEventCacheA TraceEventCache object that contains the current process ID, thread ID, and stack trace information.
source
stringAn identification of the source of the trace request.
eventType
TraceEventTypeOne of the TraceEventType values specifying the type of event that has caused the trace.
id
intA numeric identifier for the event.
data
objectThe trace data to emit.
TraceEvent(TraceEventCache, string, TraceEventType, int, string)
Writes trace information, a message, and event information through the Logging Application Block.
public override void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string message)
Parameters
eventCache
TraceEventCacheA TraceEventCache object that contains the current process ID, thread ID, and stack trace information.
source
stringAn identification of the source of the trace request.
eventType
TraceEventTypeOne of the TraceEventType values specifying the type of event that has caused the trace.
id
intA numeric identifier for the event.
message
stringA message to write.
TraceEvent(TraceEventCache, string, TraceEventType, int, string, params object[])
Writes trace information, a formatted array of objects and event information through the Logging Application Block.
public override void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string format, params object[] args)
Parameters
eventCache
TraceEventCacheA TraceEventCache object that contains the current process ID, thread ID, and stack trace information.
source
stringAn identification of the source of the trace request.
eventType
TraceEventTypeOne of the TraceEventType values specifying the type of event that has caused the trace.
id
intA numeric identifier for the event.
format
stringA format string that contains zero or more format items, which correspond to objects in the
args
array.args
object[]An object array containing zero or more objects to format.
TraceTransfer(TraceEventCache, string, int, string, Guid)
Writes trace information, a message, a related activity identity and event information.
public override void TraceTransfer(TraceEventCache eventCache, string source, int id, string message, Guid relatedActivityId)
Parameters
eventCache
TraceEventCacheA TraceEventCache object that contains the current process ID, thread ID, and stack trace information.
source
stringA name used to identify the output, typically the name of the application that generated the trace event.
id
intA numeric identifier for the event.
message
stringA message to write.
relatedActivityId
GuidA Guid object identifying a related activity.
Remarks
The relatedActivityId
is saved to a LogEntry so the logging infrastructure can reconstruct the transfer message.
Write(string)
Writes the specified message through the Logging Application Block.
public override void Write(string message)
Parameters
message
string
WriteLine(string)
Writes the specified message through the Logging Application Block.
public override void WriteLine(string message)
Parameters
message
string