SendToFlatFileTraceListenerExtension.FlatFile Method
Adds a new FlatFileTraceListener to the logging settings and creates a reference to this Trace Listener for the current category source.
Namespace: Microsoft.Practices.EnterpriseLibrary.Common.Configuration
Assembly: Microsoft.Practices.EnterpriseLibrary.Logging (in Microsoft.Practices.EnterpriseLibrary.Logging.dll) Version: 6.0.0.0 (6.0.1304.0)
Syntax
public static ILoggingConfigurationSendToFlatFileTraceListener FlatFile(
this ILoggingConfigurationSendTo context,
string listenerName
)
'Declaration
<ExtensionAttribute>
Public Shared Function FlatFile (
context As ILoggingConfigurationSendTo,
listenerName As String
) As ILoggingConfigurationSendToFlatFileTraceListener
public:
[ExtensionAttribute]
static ILoggingConfigurationSendToFlatFileTraceListener^ FlatFile(
ILoggingConfigurationSendTo^ context,
String^ listenerName
)
Parameters
- context
Type: Microsoft.Practices.EnterpriseLibrary.Common.Configuration.Fluent.ILoggingConfigurationSendTo
Fluent interface extension point.
- listenerName
Type: System.String
The name of the FlatFileTraceListener.
Return Value
Type: ILoggingConfigurationSendToFlatFileTraceListener
Fluent interface that can be used to further configure the created FlatFileTraceListenerData.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type ILoggingConfigurationSendTo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also
SendToFlatFileTraceListenerExtension Class
SendToFlatFileTraceListenerExtension Members
Microsoft.Practices.EnterpriseLibrary.Common.Configuration Namespace
Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData