Skip to content

FileOutput Class

Definition

namespace Sharplog.Outputs

 public class FileOutput : AsyncOutput
Object
Output
   AsyncOutput
     FileOutput

Output writing asynchronously to a file.

Constructors

Name
FileOutput()
FileOutput(string, int, string, LevelContainer)

Properties

Name Type GET SET
Format string
Levels LevelContainer
SuspendTime int
Path string

Inherited Methods

Name Modifiers Returns
Write(string, Log) public
Start() public
WriteNonBlocking((string, Log)[]) public

Constructors

FileOutput()

public FileOutput()
    : this(".log", 500, null, null)

Initializes a new instance of the FileOutput class.

FileOutput(string, int, string, LevelContainer)

public FileOutput(
    string path = ".log",
    int suspendTime = 500,
    string format = null,
    LevelContainer levels = null)
    : base(suspendTime, format, levels)

Initializes a new instance of the FileOutput class.

Parameter

path string · ".log"
The path.
suspendTime int · 500
The suspend time between logs in ms.
format string · null
The format.
levels LevelContainer · null
The level settings.

Properties

Path

public string Path { get; set; }
Type: string

Gets or sets the path the output should log to.