seq-logging

How to setup serilog SEQ for .NET Core 3.0 Worker Service

限于喜欢 提交于 2021-02-10 05:12:52
问题 Logging is working but it is not posting to my local seq, I tried adding serilog and also useSerilog but it does not logging into my local service: related question .csproj <ItemGroup> <PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.7" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="3.0.0" /> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.0.1" /> <PackageReference Include="Serilog" Version="2.8.0" /> <PackageReference Include=

How to setup serilog SEQ for .NET Core 3.0 Worker Service

不羁的心 提交于 2021-02-10 05:11:36
问题 Logging is working but it is not posting to my local seq, I tried adding serilog and also useSerilog but it does not logging into my local service: related question .csproj <ItemGroup> <PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.7" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="3.0.0" /> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.0.1" /> <PackageReference Include="Serilog" Version="2.8.0" /> <PackageReference Include=

How to setup serilog SEQ for .NET Core 3.0 Worker Service

隐身守侯 提交于 2021-02-10 05:10:47
问题 Logging is working but it is not posting to my local seq, I tried adding serilog and also useSerilog but it does not logging into my local service: related question .csproj <ItemGroup> <PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.7" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="3.0.0" /> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.0.1" /> <PackageReference Include="Serilog" Version="2.8.0" /> <PackageReference Include=

Serilog serializing fields

北城以北 提交于 2020-11-28 07:46:41
问题 If I have the following class public class Customer { public string Name; } and then have the following log command in Serilog Log.Logger = new LoggerConfiguration() .WriteTo.Console() .WriteTo.Seq("http://localhost:5341") .CreateLogger(); var item = new Customer(); item.Name = "John"; Serilog.Log.Information("Customer {@item}", item); The log just displays in Seq as Customer {} If I change the Name field to a property it works but I would prefer not to do that at this stage. Is there any way

Serilog serializing fields

江枫思渺然 提交于 2020-11-28 07:46:11
问题 If I have the following class public class Customer { public string Name; } and then have the following log command in Serilog Log.Logger = new LoggerConfiguration() .WriteTo.Console() .WriteTo.Seq("http://localhost:5341") .CreateLogger(); var item = new Customer(); item.Name = "John"; Serilog.Log.Information("Customer {@item}", item); The log just displays in Seq as Customer {} If I change the Name field to a property it works but I would prefer not to do that at this stage. Is there any way