Class LogStashLogProvider
A log provider that sends logs to LogStash.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class LogStashLogProvider : LogProvider
Constructors
LogStashLogProvider(String, Int32, Boolean)
Creates a new instance of a LogStash log provider using DefaultLogLevel as log level.
Declaration
public LogStashLogProvider(string address, int port, bool useSSL)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | The LogStash server address. |
System.Int32 | port | The LogStash server port. |
System.Boolean | useSSL | Whether to use SSL/TLS when connecting to the LogStash server. |
LogStashLogProvider(String, Int32, Boolean, LogLevel)
Creates a new instance of a LogStash log provider.
Declaration
public LogStashLogProvider(string address, int port, bool useSSL, LogLevel level)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | The address of LogStash. |
System.Int32 | port | The port of LogStash. |
System.Boolean | useSSL | Whether to use SSL/TLS when connecting to the LogStash server. |
LogLevel | level | The initial log level. |
Properties
Address
Gets the LogStash server address.
Declaration
public string Address { get; }
Property Value
Type | Description |
---|---|
System.String |
Port
Gets the LogStash server port.
Declaration
public int Port { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
DoLog(LogEvent)
Logs a message at the specified log level.
Declaration
protected override void DoLog(LogEvent logEvent)
Parameters
Type | Name | Description |
---|---|---|
LogEvent | logEvent | The log event details. |