Skip to content

Output json doesn't work in PowerShellΒ #81

@Marusyk

Description

@Marusyk

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
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions