【发布时间】:2021-04-20 11:59:57
【问题描述】:
我为 NET Core 运行示例: [https://github.com/mattwcole/gelf-extensions-logging/blob/dev/samples/Gelf.Extensions.Logging.Samples.NetCore2/Program.cs][1]
然后我运行了 Docker https://docs.graylog.org/en/4.0/pages/installation/docker.html?highlight=docker
然后我稍微修正了 appsettings.json 文件:
{
"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"
}
}
}
}
运行应用程序,它可以工作,但是当我转到浏览器时 http://localhost:9000/search?q=&rangetype=relative&relative=1800 我没有看到任何记录。 我做错了什么?
【问题讨论】: