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

Output json doesn't work in PowerShell #81

Open
Marusyk opened this issue Jun 27, 2024 · 0 comments
Open

Output json doesn't work in PowerShell #81

Marusyk opened this issue Jun 27, 2024 · 0 comments

Comments

@Marusyk
Copy link
Owner

Marusyk commented Jun 27, 2024

The code

 grok -p "C:\Users\RomanMarusyk\Desktop\warn.txt" -g ": warning %{WORD:code}" -o json

or inline

grok -i "2024-06-27T10:58:32.4530837Z ##[warning]/src/DatabaseSeeding/DatabaseSeeding/Data/Seeding/SeedTestData.cs(410,65): warning CA5394: Random is an insecure random number generator. Use cryptographically secure random number generators when randomness is required for security. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5394)" -g ": warning %{WORD:code}: " -o json

Error:

grok : Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
At line:1 char:1

  • grok -i "2024-06-27T10:58:32.4530837Z ##[warning]/src/DS.DatabaseSeed ...
  •   + CategoryInfo          : NotSpecified: (:) [Get-Grok], FileNotFoundException
      + FullyQualifiedErrorId : System.IO.FileNotFoundException,GrokNet.PowerShell.GrokCmdlet
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant