Added type parameter for Log/Tail inputs

This commit is contained in:
Eric Fontana
2015-04-29 10:58:13 -04:00
parent 50473a1f5a
commit 6600bb2b85
4 changed files with 15 additions and 0 deletions

View File

@@ -44,6 +44,11 @@ namespace TimberWinR.Inputs
.ToString();
}
public void SetTypeName(string newType)
{
_typeName = newType;
}
public bool HaveSeenFile(string fileName)
{
return Files.Contains(fileName);

View File

@@ -53,6 +53,9 @@ namespace TimberWinR.Inputs
if (_codecArguments != null && _codecArguments.Type == CodecArguments.CodecType.multiline)
_codec = new Multiline(_codecArguments);
if (!string.IsNullOrEmpty(arguments.Type))
SetTypeName(arguments.Type);
_receivedMessages = 0;
_arguments = arguments;
_pollingIntervalInSeconds = arguments.Interval;

View File

@@ -48,6 +48,9 @@ namespace TimberWinR.Inputs
if (_codecArguments != null && _codecArguments.Type == CodecArguments.CodecType.multiline)
_codec = new Multiline(_codecArguments);
if (!string.IsNullOrEmpty(arguments.Type))
SetTypeName(arguments.Type);
_receivedMessages = 0;
_arguments = arguments;
_pollingIntervalInSeconds = arguments.Interval;

View File

@@ -333,6 +333,8 @@ namespace TimberWinR.Parser
public class TailFileArguments : IValidateSchema
{
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
[JsonProperty(PropertyName = "location")]
public string Location { get; set; }
[JsonProperty(PropertyName = "recurse")]
@@ -363,6 +365,8 @@ namespace TimberWinR.Parser
public class LogParameters : IValidateSchema
{
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
[JsonProperty(PropertyName = "location")]
public string Location { get; set; }
[JsonProperty(PropertyName = "iCodepage")]