Skip to content

Commit b56bc4d

Browse files
authored
Merge pull request #210 from datalust/dev
2021.3.0 Release
2 parents ea581b4 + b183905 commit b56bc4d

File tree

108 files changed

+2780
-1236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+2780
-1236
lines changed

Build.ps1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function Create-ArtifactDir
2626

2727
function Publish-Archives($version)
2828
{
29-
$rids = @("linux-x64", "linux-musl-x64", "osx-x64", "win-x64")
29+
$rids = @("linux-x64", "linux-musl-x64", "linux-arm64", "osx-x64", "win-x64")
3030
foreach ($rid in $rids) {
3131
$tfm = $framework
3232
if ($rid -eq "win-x64") {
@@ -61,6 +61,15 @@ function Publish-DotNetTool($version)
6161
{
6262
# Tool packages have to target a single non-platform-specific TFM; doing this here is cleaner than attempting it in the CSPROJ directly
6363
dotnet pack ./src/SeqCli/SeqCli.csproj -c Release --output ./artifacts /p:VersionPrefix=$version /p:TargetFramework=$framework /p:TargetFrameworks=
64+
if($LASTEXITCODE -ne 0) { exit 7 }
65+
}
66+
67+
function Publish-Docs($version)
68+
{
69+
Write-Output "Generating markdown documentation"
70+
71+
& dotnet run --project ./src/SeqCli/SeqCli.csproj -f $framework -- help --markdown > ./artifacts/seqcli-$version.md
72+
if($LASTEXITCODE -ne 0) { exit 8 }
6473
}
6574

6675
Push-Location $PSScriptRoot
@@ -74,5 +83,6 @@ Restore-Packages
7483
Publish-Archives($version)
7584
Publish-DotNetTool($version)
7685
Execute-Tests
86+
Publish-Docs($version)
7787

7888
Pop-Location

README.md

Lines changed: 291 additions & 5 deletions
Large diffs are not rendered by default.

appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2021.2.{build}
1+
version: 2021.3.{build}
22
skip_tags: true
33
image:
44
- Visual Studio 2019
@@ -13,6 +13,7 @@ artifacts:
1313
- path: artifacts/seqcli-*.zip
1414
- path: artifacts/seqcli-*.tar.gz
1515
- path: artifacts/seqcli.*.nupkg
16+
- path: artifacts/seqcli-*.md
1617

1718
for:
1819
-

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "5.0.100"
3+
"version": "5.0.400"
44
}
5-
}
5+
}

seqcli.sln.DotSettings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<s:Boolean x:Key="/Default/UserDictionary/Words/=appinstances/@EntryIndexedValue">True</s:Boolean>
55
<s:Boolean x:Key="/Default/UserDictionary/Words/=BASEURI/@EntryIndexedValue">True</s:Boolean>
66
<s:Boolean x:Key="/Default/UserDictionary/Words/=Camelize/@EntryIndexedValue">True</s:Boolean>
7+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ceci/@EntryIndexedValue">True</s:Boolean>
78
<s:Boolean x:Key="/Default/UserDictionary/Words/=cmds/@EntryIndexedValue">True</s:Boolean>
89
<s:Boolean x:Key="/Default/UserDictionary/Words/=command_0027s/@EntryIndexedValue">True</s:Boolean>
910
<s:Boolean x:Key="/Default/UserDictionary/Words/=Datalust/@EntryIndexedValue">True</s:Boolean>
@@ -14,13 +15,15 @@
1415
<s:Boolean x:Key="/Default/UserDictionary/Words/=Gravatar/@EntryIndexedValue">True</s:Boolean>
1516
<s:Boolean x:Key="/Default/UserDictionary/Words/=hackily/@EntryIndexedValue">True</s:Boolean>
1617
<s:Boolean x:Key="/Default/UserDictionary/Words/=mdash/@EntryIndexedValue">True</s:Boolean>
18+
<s:Boolean x:Key="/Default/UserDictionary/Words/=n_0027est/@EntryIndexedValue">True</s:Boolean>
1719
<s:Boolean x:Key="/Default/UserDictionary/Words/=retentionpolicies/@EntryIndexedValue">True</s:Boolean>
1820
<s:Boolean x:Key="/Default/UserDictionary/Words/=retentionpolicy/@EntryIndexedValue">True</s:Boolean>
1921
<s:Boolean x:Key="/Default/UserDictionary/Words/=roastery/@EntryIndexedValue">True</s:Boolean>
2022
<s:Boolean x:Key="/Default/UserDictionary/Words/=seqcli/@EntryIndexedValue">True</s:Boolean>
2123
<s:Boolean x:Key="/Default/UserDictionary/Words/=Serilog/@EntryIndexedValue">True</s:Boolean>
2224
<s:Boolean x:Key="/Default/UserDictionary/Words/=serilogdt/@EntryIndexedValue">True</s:Boolean>
2325
<s:Boolean x:Key="/Default/UserDictionary/Words/=sqlqueries/@EntryIndexedValue">True</s:Boolean>
26+
<s:Boolean x:Key="/Default/UserDictionary/Words/=sqlquery/@EntryIndexedValue">True</s:Boolean>
2427
<s:Boolean x:Key="/Default/UserDictionary/Words/=STDIN/@EntryIndexedValue">True</s:Boolean>
2528
<s:Boolean x:Key="/Default/UserDictionary/Words/=STORAGEPATH/@EntryIndexedValue">True</s:Boolean>
2629
<s:Boolean x:Key="/Default/UserDictionary/Words/=subcommand/@EntryIndexedValue">True</s:Boolean>

src/SeqCli/Cli/Command.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,16 @@ protected T Enable<T>(T t)
5151

5252
public void PrintUsage()
5353
{
54-
if (Options.Any())
54+
var allOptions = new OptionSet();
55+
foreach (var option in Options)
5556
{
56-
Console.Error.WriteLine("Arguments:");
57-
Options.WriteOptionDescriptions(Console.Error);
57+
allOptions.Add(option);
5858
}
59+
60+
allOptions.Add("v|verbose", "Print verbose output to `STDERR`", _ => { });
61+
62+
Console.Error.WriteLine("Arguments:");
63+
allOptions.WriteOptionDescriptions(Console.Error);
5964
}
6065

6166
public async Task<int> Invoke(string[] args)

src/SeqCli/Cli/CommandLineHost.cs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
using System.Reflection;
1919
using System.Threading.Tasks;
2020
using Autofac.Features.Metadata;
21+
using Serilog.Core;
22+
using Serilog.Events;
23+
24+
#nullable enable
2125

2226
namespace SeqCli.Cli
2327
{
@@ -30,10 +34,10 @@ public CommandLineHost(IEnumerable<Meta<Lazy<Command>, CommandMetadata>> availab
3034
_availableCommands = availableCommands.ToList();
3135
}
3236

33-
public async Task<int> Run(string[] args)
37+
public async Task<int> Run(string[] args, LoggingLevelSwitch levelSwitch)
3438
{
3539
var ea = Assembly.GetEntryAssembly();
36-
var name = ea.GetName().Name;
40+
var name = ea!.GetName().Name;
3741

3842
if (args.Length > 0)
3943
{
@@ -46,7 +50,16 @@ public async Task<int> Run(string[] args)
4650
if (cmd != null)
4751
{
4852
var amountToSkip = cmd.Metadata.SubCommand == null ? 1 : 2;
49-
return await cmd.Value.Value.Invoke(args.Skip(amountToSkip).ToArray());
53+
var commandSpecificArgs = args.Skip(amountToSkip).ToArray();
54+
55+
var verboseArg = commandSpecificArgs.FirstOrDefault(arg => arg is "-v" or "--verbose");
56+
if (verboseArg != null)
57+
{
58+
levelSwitch.MinimumLevel = LogEventLevel.Information;
59+
commandSpecificArgs = commandSpecificArgs.Where(arg => arg != verboseArg).ToArray();
60+
}
61+
62+
return await cmd.Value.Value.Invoke(commandSpecificArgs);
5063
}
5164
}
5265

src/SeqCli/Cli/Commands/ApiKey/CreateCommand.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
using System.Linq;
1717
using System.Threading.Tasks;
1818
using Seq.Api;
19-
using Seq.Api.Model.Inputs;
2019
using Seq.Api.Model.LogEvents;
2120
using Seq.Api.Model.Security;
2221
using Seq.Api.Model.Shared;
@@ -108,7 +107,7 @@ protected override async Task<int> Run()
108107

109108
apiKey.Title = _title;
110109
apiKey.InputSettings.AppliedProperties = _properties.Properties
111-
.Select(kvp => new InputAppliedPropertyPart {Name = kvp.Key, Value = kvp.Value})
110+
.Select(kvp => new EventPropertyPart(kvp.Key, kvp.Value))
112111
.ToList();
113112
apiKey.InputSettings.UseServerTimestamps = _useServerTimestamps;
114113

src/SeqCli/Cli/Commands/Dashboard/RenderCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using System.Linq;
1717
using System.Threading.Tasks;
1818
using Newtonsoft.Json;
19-
using Seq.Api.Model.Monitoring;
19+
using Seq.Api.Model.Dashboarding;
2020
using Seq.Api.Model.Signals;
2121
using SeqCli.Cli.Features;
2222
using SeqCli.Config;

src/SeqCli/Cli/Commands/IngestCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class IngestCommand : Command
4646
public IngestCommand(SeqConnectionFactory connectionFactory)
4747
{
4848
_connectionFactory = connectionFactory;
49-
_fileInputFeature = Enable(new FileInputFeature("File to ingest", supportsWildcard: true));
49+
_fileInputFeature = Enable(new FileInputFeature("File(s) to ingest", supportsWildcard: true));
5050
_invalidDataHandlingFeature = Enable<InvalidDataHandlingFeature>();
5151
_properties = Enable<PropertiesFeature>();
5252

0 commit comments

Comments
 (0)