fedarovich / isle Goto Github PK
View Code? Open in Web Editor NEWISLE (Interpolated String Logging Extensions) is a library that allows developers to perform structured logging using interpolated strings in C# 10 or later.
License: MIT License
ISLE (Interpolated String Logging Extensions) is a library that allows developers to perform structured logging using interpolated strings in C# 10 or later.
License: MIT License
Thanks for this library, I'm quite liking using it. However, I'd like to request that the interpolation handlers be changed to regular structs, not ref structs. As far as I can tell, there's no nested ref struct usage in the handlers, so there's no benefit for them being marked as ref structs. This blocks their usage with interpolation arguments that are await
expressions (which, yes, it can certainly be argued that logging shouldn't have nested asyncs, but given that interpolation won't execute it if the log level isn't enabled I think this case is fine).
ISLE breaks ASP.NET Core integration tests that are created with WebApplicationFactory<TEntryPoint>
as documented here.
With such tests the startup code, and therefore also IsleConfiguration.Configure()
, is executed once for each test. But ISLE throws an exception on every call after the first one.
This issue is very similar to #3
As explained there, you have to call IsleConfiguration.Reset()
to get ASP.NET Core integration tests with ISLE to work.
But this only helps as long as you execute all integration tests sequentially. If you want to execute them in parallel then you'll again get "Isle has already been configured" exceptions because multiple IsleConfiguration.Configure
calls may happen between the IsleConfiguration.Reset()
calls.
Please make it possible to run parallel ASP.NET Core integration tests with ISLE.
The types DateOnly
and TimeOnly
are currently affected by builder.WithAutomaticDestructuring()
. It would be better if they were handled as "simple" types like DateTime
.
_propertyValues
are rented from the ArrayPool but are never returned back.
Any chance ISLE could be update to work with Serilog 3.x? Especially since Serilog 2.x will not get updates anymore since .NET 8.
For example, right now I get the following error when calling WarningInterpolated:
_logger.WarningInterpolated($"User {query.Username} does not exist.");
System.MissingMethodException: 'Method not found: 'Void Serilog.Parsing.TextToken..ctor(System.String, Int32)'.'
This probably comes from a change in Serilog's API.
Example code:
var now = DateTime.Now;
_logger.LogInformation($"property: {now.Day}");
var day = now.Day;
_logger.LogInformation($"simple: {day}");
Expected output:
property: 24
simple: 24
Actual output:
property: {now.Day}
simple: 24
The property access expressions could also be for more levels, that should also be supported.
The last step could also be a method call instead of a property access.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.