public IngestCommand(SeqConnectionFactory connectionFactory) { _connectionFactory = connectionFactory; _fileInputFeature = Enable(new FileInputFeature("File(s) to ingest", supportsWildcard: true)); _invalidDataHandlingFeature = Enable <InvalidDataHandlingFeature>(); _properties = Enable <PropertiesFeature>(); Options.Add("x=|extract=", "An extraction pattern to apply to plain-text logs (ignored when `--json` is specified)", v => _pattern = string.IsNullOrWhiteSpace(v) ? DefaultPattern : v.Trim()); Options.Add("json", "Read the events as JSON (the default assumes plain text)", v => _json = true); Options.Add("f=|filter=", "Filter expression to select a subset of events", v => _filter = string.IsNullOrWhiteSpace(v) ? null : v.Trim()); Options.Add( "m=|message=", "A message to associate with the ingested events; https://messagetemplates.org syntax is supported", v => _message = string.IsNullOrWhiteSpace(v) ? null : v.Trim()); Options.Add("l=|level=", "The level or severity to associate with the ingested events; this will override any " + "level information present in the events themselves", v => _level = string.IsNullOrWhiteSpace(v) ? null : v.Trim()); _sendFailureHandlingFeature = Enable <SendFailureHandlingFeature>(); _connection = Enable <ConnectionFeature>(); _batchSize = Enable <BatchSizeFeature>(); }
public IngestCommand(SeqConnectionFactory connectionFactory) { _connectionFactory = connectionFactory; _fileInputFeature = Enable <FileInputFeature>(); _invalidDataHandlingFeature = Enable <InvalidDataHandlingFeature>(); _properties = Enable <PropertiesFeature>(); Options.Add("x=|extract=", "An extraction pattern to apply to plain-text logs (ignored when `--json` is specified)", v => _pattern = string.IsNullOrWhiteSpace(v) ? DefaultPattern : v.Trim()); Options.Add("json", "Read the events as JSON (the default assumes plain text)", v => _json = true); Options.Add("f=|filter=", "Filter expression to select a subset of events", v => _filter = string.IsNullOrWhiteSpace(v) ? null : v.Trim()); _sendFailureHandlingFeature = Enable <SendFailureHandlingFeature>(); _connection = Enable <ConnectionFeature>(); }