XmlLayoutBase LocationInfo Property | Apache log4net™ SDK Documentation

Gets a value indicating whether to include location information in the XML events.

Namespace: log4net.Layout
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public bool LocationInfo { get; set; }

    Public Property LocationInfo As Boolean
    	Get
    	Set

    public:
    property bool LocationInfo {
    	bool get ();
    	void set (bool value);
    }

    member LocationInfo : bool with get, set

#### Property Value

Type: Boolean
true if location information should be included in the XML events; otherwise, false.
Remarks

If LocationInfo is set to true, then the file name and line number of the statement at the origin of the log statement will be output.

If you are embedding this layout within an SMTPAppender then make sure to set the LocationInfo option of that appender as well.

See Also

#### Reference

XmlLayoutBase Class
log4net.Layout Namespace