Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when trying to apply filter on ingest #87

Closed
kevbry opened this issue Jan 7, 2019 · 4 comments
Closed

Exception when trying to apply filter on ingest #87

kevbry opened this issue Jan 7, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@kevbry
Copy link

kevbry commented Jan 7, 2019

When attempting to apply any filter using ingest, a MissingMethodException is thrown. The filter I'd like to use would be based on date, but the level filter from the seqcli docs also does not seem to work.

Initial installation was 5.0.2375. Updated to 5.0.2394, which also fails the same way.

PS C:\Temp> seqcli ingest -i .\unified.log --json --filter="@Level <> 'Debug'" -p Environment=Test
Ingestion failed: Method not found: 'Superpower.Model.Token`1<!0> Superpower.Tokenizer`1.get_Previous()'.
System.MissingMethodException: Method not found: 'Superpower.Model.Token`1<!0> Superpower.Tokenizer`1.get_Previous()'.
   at Serilog.Filters.Expressions.Parsing.FilterExpressionTokenizer.Tokenize(TextSpan stringSpan)+MoveNext()
   at Superpower.Tokenizer`1.TryTokenize(String source)
   at Serilog.Filters.Expressions.Parsing.FilterExpressionParser.TryParse(String filterExpression, FilterExpression& root, String& error)
   at Serilog.Filters.Expressions.FilterLanguage.TryCreateFilter(String expression, Func`2& filter, String& error)
   at Serilog.Filters.Expressions.FilterLanguage.CreateFilter(String expression)
   at SeqCli.Cli.Commands.IngestCommand.Run() in C:\projects\seqcli\src\SeqCli\Cli\Commands\IngestCommand.cs:line 79
PS C:\Temp> seqcli version
5.0.165
PS C:\Temp> seq version
5.0.2394
@kevbry
Copy link
Author

kevbry commented Jan 7, 2019

From a quick look around it looks as though seqcli is referencing serilog.filters.expressions 1.1.0 and superpower 2.0. Looks like serilog.filters.expressions 2.0 is where compatibility with superpower 2.0 was added.
Updating Serilog.Filters.Expressions.dll to version 2.0 from here:

https://www.nuget.org/packages/Serilog.Filters.Expressions/2.0.0

seems to fix the issue.

@nblumhardt nblumhardt added the bug Something isn't working label Jan 8, 2019
@nblumhardt
Copy link
Member

Thanks for the report and investigation, @kevbry - we'll sort this out 👍

@kevbry
Copy link
Author

kevbry commented Jan 8, 2019

Thanks for the fix, and the fantastic software

@nblumhardt
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants