mattwcole / gelf-extensions-logging

GELF provider for Microsoft.Extensions.Logging
MIT License
109 stars 42 forks source link

Gelf.Extensions.Logging.Samples.NetCore2 does not work #60

Closed ZedZipDev closed 3 years ago

ZedZipDev commented 3 years ago
  1. I have ran Docker https://docs.graylog.org/en/4.0/pages/installation/docker.html?highlight=docker

  2. Then I little bit corrected appjson file:

    
    {
    "Logging": {
    "Console": {
      "LogLevel": {
        "Default": "Debug"
      }
    },
    "GELF": {
      "Host": "127.0.0.1",
      "Port": 12201,
      "LogSource": "console-app-1",
      "LogLevel": {
        "Default": "Debug",
        "Microsoft": "Debug",
        "Gelf.Extensions.Logging.Samples.NetCore2": "Debug",
        "Gelf.Extensions.Logging.Samples.NetCore2.Program": "Debug"
      },
      "LogLevel2": {
        "Microsoft.AspNetCore.Mvc.Razor": "Error",
        "Default": "Trace"
      },
      "AdditionalFields": {
        "project_name": "my-project"
      }
    }
    }
    }

3. Run the application, it works but when I go to browser
http://localhost:9000/search?q=&rangetype=relative&relative=1800
I do not see any records.

What I do wrong?
ZedZipDev commented 3 years ago

It works fine, need to configure the GrayLog in Docker. Thanx.