Class FileDestination
Provides a file storage destination implementation
Inheritance
System.Object
FileDestination
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.Log.Destinations
Assembly: NFX.dll
Syntax
public abstract class FileDestination : Destination, IApplicationComponent, IDisposable, IConfigurable, IExternallyParameterized
Constructors
FileDestination(String)
Declaration
protected FileDestination(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Fields
m_FileName
Declaration
protected string m_FileName
Field Value
Type | Description |
---|---|
System.String |
m_Path
Declaration
protected string m_Path
Field Value
Type | Description |
---|---|
System.String |
m_Stream
Declaration
protected FileStream m_Stream
Field Value
Type | Description |
---|---|
System.IO.FileStream |
Properties
DefaultFileName
Declaration
protected virtual string DefaultFileName { get; }
Property Value
Type | Description |
---|---|
System.String |
FileName
The name of the file without path may use {0} for date: {0:yyyyMMdd}-$($name).csv.log
Declaration
[Config]
public virtual string FileName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Path
Directory where file should be created. Will create the directory chain if it doesn't exist
Declaration
[Config]
public virtual string Path { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Close()
Declaration
public override void Close()
Overrides
DoCloseStream()
Called just before output stream is closed
Declaration
protected abstract void DoCloseStream()
DoOpenStream()
Called after output stream has been opened
Declaration
protected abstract void DoOpenStream()
DoPulse()
Declaration
protected override void DoPulse()
Overrides
DoSend(Message)
Override DoFormatMessage() instead
Declaration
protected override sealed void DoSend(Message msg)
Parameters
Type | Name | Description |
---|---|---|
Message | msg |
Overrides
DoWriteMessage(Message)
Called when message is to be written to stream
Declaration
protected abstract void DoWriteMessage(Message msg)
Parameters
Type | Name | Description |
---|---|---|
Message | msg |
GetDestinationFileName()
Declaration
protected virtual string GetDestinationFileName()
Returns
Type | Description |
---|---|
System.String |
Open()
Declaration
public override void Open()
Overrides
Implements
System.IDisposable