-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from serilog/dev
3.4 Release
- Loading branch information
Showing
13 changed files
with
326 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
src/Serilog.Sinks.TCP/Sinks/Splunk/SplunkTcpSinkConnectionInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Copyright 2016 Serilog Contributors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using System.Net; | ||
|
||
namespace Serilog.Sinks.Splunk | ||
{ | ||
/// <summary> | ||
/// Defines connection info used to connect against Splunk | ||
/// using TCP. | ||
/// </summary> | ||
public class SplunkTcpSinkConnectionInfo | ||
{ | ||
/// <summary> | ||
/// Default size of the socket writer queue. | ||
/// </summary> | ||
public const int DefaultMaxQueueSize = 10000; | ||
|
||
/// <summary> | ||
/// Splunk host. | ||
/// </summary> | ||
public IPAddress Host { get; } | ||
|
||
/// <summary> | ||
/// Splunk port. | ||
/// </summary> | ||
public int Port { get; } | ||
|
||
/// <summary> | ||
/// Max Queue size for the TCP socket writer. | ||
/// See <see cref="DefaultMaxQueueSize"/> for default value (10000). | ||
/// </summary> | ||
public int MaxQueueSize { get; set; } = DefaultMaxQueueSize; | ||
|
||
/// <summary> | ||
/// Creates an instance of <see cref="SplunkTcpSinkConnectionInfo"/> used | ||
/// for defining connection info for connecting using TCP against Splunk. | ||
/// </summary> | ||
/// <param name="host">Splunk host.</param> | ||
/// <param name="port">Splunk TCP port.</param> | ||
public SplunkTcpSinkConnectionInfo(string host, int port) : this(IPAddress.Parse(host), port) { } | ||
|
||
/// <summary> | ||
/// Creates an instance of <see cref="SplunkTcpSinkConnectionInfo"/> used | ||
/// for defining connection info for connecting using TCP against Splunk. | ||
/// </summary> | ||
/// <param name="host">Splunk host.</param> | ||
/// <param name="port">Splunk TCP port.</param> | ||
public SplunkTcpSinkConnectionInfo(IPAddress host, int port) | ||
{ | ||
Host = host; | ||
Port = port; | ||
} | ||
} | ||
} |
Oops, something went wrong.