Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
LogFileName Property
Collapse the table of content
Expand the table of content

DefaultTraceListener.LogFileName Property

Gets or sets the name of a log file to write trace or debug messages to.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)

member LogFileName : string with get, set

Property Value

Type: System.String
The name of a log file to write trace or debug messages to.

The following code example creates a new DefaultTraceListener, adds it to the Trace.Listeners collection, and sets the LogFileName property to the log file specified in the command-line arguments.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft