Questions tagged [serilog]

Serilog is a .NET library which provides diagnostic logging to files, the console, and so-on. Consider using this tag along with the .net framework version you are using for extra clarity

Serilog is a library that provides diagnostic logging to files, the console, and so-on. It is easy to set up, has a clean API, and is portable between recent .NET platforms.

Unlike other logging libraries for .NET, Serilog is built with structured log data in mind. Parameters passed along with log messages are not destructively rendered into a text format. Instead, they're preserved as structured data that can be written in document form to a data store.

Useful links

2233 questions
1
vote
1 answer

Azure function : Appsetting.json is not working with Serilog.Sinks.Sumologic

We are trying to implement logging using Serilog.Sinks.SumoLogic(1.0.1) to Azure function apps (without .NET core). Below is the code and appsetting.json we are using. Code: var configuration = new ConfigurationBuilder() …
1
vote
0 answers

Enriching Serilog.Logger -- I get none of my enrichments?

I try to log to ES through Serilog and I'm having trouble getting the enrichment to work. I should like to include values from my app.config to leverage information updated by deployment. None of the fields are shown in ES/Rolling file. I've…
Anders Juul
  • 2,407
  • 3
  • 34
  • 56
1
vote
1 answer

Adding Serilog sub-logger to limit data going to log aggregator

I have a need to send data via a sub-logger that only includes specific contextual data. In this case, I am pretty much wanting to ignore everything from the Message Template (except the text itself) and pass key contextual data already added by…
Keith Barrows
  • 24,802
  • 26
  • 88
  • 134
1
vote
1 answer

Will the Serilog logging library work in a .net WPF application?

I have a .Net C# WPF application. I'm trying to add rolling logs to the app. In Asp.Net applications, we've previously used the package Serilog. Does Serilog work .Net desktop (non-asp.net) applications? I googled around and saw there were some…
JohnB
  • 3,921
  • 8
  • 49
  • 99
1
vote
2 answers

Even with Nuget.exe 4.1.0 - Serilog already has a dependency defined for 'Microsoft.CSharp'

I know there's an answer for this question from 2016 but it's not working today. I have VS2013 with the latest CU installed. My Nuget package source settings: I want to install the nu-get package "Serilog.Sinks.MSSqlServer". First, I ensure nuget is…
Rob Bowman
  • 7,632
  • 22
  • 93
  • 200
1
vote
1 answer

serilog write log .netcore

I implemented Serilog in my project and Serilog creates log file but it doesn't write any logs? My appsettings.json file is below. { "Serilog":{ "Using":[ "Serilog.Sinks.RollingFile" ], …
dincer.unal
  • 67
  • 1
  • 2
  • 13
1
vote
1 answer

SerilLog not logging in web application

On my WebUI project startUp.cs class i have public Startup() { Log.Logger = new LoggerConfiguration() .WriteTo.Console() .CreateLogger(); } and in my class library project sample.cs…
DisplayName
  • 71
  • 1
  • 7
1
vote
1 answer

Serilog configuration and Application Insight .net core

Im trying to filter my input to application insight by configuration. Im sending data from SeriLog with the ApplicationInsightsTraces-sink as can be seen below in my configuration: Log.Logger = new LoggerConfiguration() …
forsmyr
  • 304
  • 3
  • 14
1
vote
1 answer

Serilog MS SqlServer Sink only writing 1 log level

I have hooked up Serilog with .NetCore and I am using the MSSQLServer sink. I can log to the database with my current setup but it seems that only one log level shows up. Configuration: var logger = new LoggerConfiguration() …
Dblock247
  • 6,167
  • 10
  • 44
  • 66
1
vote
1 answer

Serilog in ASP.NET Core - logging the EventId in its own column

ASP.NET Core logging has this concept of 'Log event ID', so that we can log lines like this (from their documentation); _logger.LogInformation(LoggingEvents.GET_ITEM, "Getting item {ID}", id); Serilog writes this inforamtion,…
ashilon
  • 1,791
  • 3
  • 24
  • 41
1
vote
3 answers

Logging To Logentries via Nlog in an Azure Function

Has anyone had any luck getting their azure function to write to Logentries via nLog? Haven't been able to find any samples or docs online. Closest thing I could find was this example but doesn't take into account…
mariob_452
  • 103
  • 1
  • 1
  • 7
1
vote
1 answer

Serilog in Asp.Net Core to SysLog sink

Is it possible to use Serilog to SysLog sink in Asp.Net core? Or maybe if there is another way to sink logs to the SysLog. Thanks.
mskuratowski
  • 4,014
  • 15
  • 58
  • 109
1
vote
1 answer

Log documents missing in Azure DocumentDB with Serilog.Sinks.AzureDocumentDB

I'm using the following code to try out Serilog and the DocumentDB sink. I see the Database (Diagnostics) and Collection (Logs) created but I don't see any documents in Azure portal's DocumentExplorer. Here's the code. class Program { static…
Tom W
  • 11
  • 1
1
vote
1 answer

Serillog v2.3.0 throws compile error for PermitCrossAppDomainCalls

My app is currently using Serilog version 1.5 for logging and we have decided to upgrade to Serilog 2.3.0. When upgrading am running into a compile time error for PermitCrossAppDomainCalls. Any ideas if the property is supported in Serilog…
Noah
  • 133
  • 7
1
vote
0 answers

Serilog sink with MsSqlServer in a .NET Core 1.1 console app

I am trying to implement Serilog sink for SQL Server (v. 13.0) in a .NET Core 1.1 Console App, but when I try to write in the table I define, the result is unfortunately always an empty. I tried to follow the documentation provided in GitHub and…
Aleph0
  • 11
  • 1
  • 2