GithubHelp home page GithubHelp logo

rebus-org / rebus.microsoft.extensions.logging Goto Github PK

View Code? Open in Web Editor NEW
3.0 6.0 7.0 1.86 MB

:bus: Microsoft Logging Extensions integration for Rebus

Home Page: https://mookid.dk/category/rebus

License: Other

C# 67.44% Batchfile 32.56%
rebus logging microsoft microsoft-extensions-logging

rebus.microsoft.extensions.logging's Introduction

Rebus.Microsoft.Extensions.Logging

install from nuget

Provides a Microsoft Extensions Logging logging integration for Rebus.


Like this:

var loggerFactory = new LoggerFactory()
	.AddConsole();

Configure.With(...)
	.Logging(l => l.MicrosoftExtensionsLogging(loggerFactory))
	.Transport(t => t.Use(...))
	.(...)
	.Start();

or like this:

var logger = new LoggerFactory()
	.AddConsole()
	.CreateLogger<Program>();

Configure.With(...)
	.Logging(l => l.MicrosoftExtensionsLogging(logger))
	.Transport(t => t.Use(...))
	.(...)
	.Start();

rebus.microsoft.extensions.logging's People

Contributors

brunomartinspro avatar dannythunder avatar mookid8000 avatar rsivanov avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rebus.microsoft.extensions.logging's Issues

Add resolver function support to allow resolving from an IoC container

I was looking at integrating Rebus with App Insights. But I'm struggling a bit with the ILoggerFactory reference.
We don't add the LoggerFactory directly to the container at the moment. So we don't have a reference when configuring the container. Adding support for passing in a resolver function would allow us to use the DI container.
image

Or is this a daft idea and should I just manually create a LoggerFactory instance?

How to set log levels?

Is there any way I can configure the log levels? I don't want my application insights to be flooded with trace messages.

image

.NET 6/7 and .NET Standard 2.1: Resolving Microsoft.Extensions.Logging Versions

Hi!

I am getting in some projects version mismatches when using .NET 6/7 with .NET Standard 2.1 as class libraries:

warning NU1608: Detected package version outside of dependency constraint: 
Rebus.Microsoft.Extensions.Logging 3.0.0 requires microsoft.extensions.logging (>= 6.0.0 && < 7.0.0) 
but version Microsoft.Extensions.Logging 7.0.0 was resolved. [TargetFramework=net6.0]
warning NU1608: Detected package version outside of dependency constraint: 
Rebus.Microsoft.Extensions.Logging 3.0.0 requires microsoft.extensions.logging (>= 6.0.0 && < 7.0.0) 
but version Microsoft.Extensions.Logging 7.0.0 was resolved. [TargetFramework=net7.0]

Is there an incompatibility of netstandard with microsoft.extensions.logging that prevents us from just using the package without version constraints? if so, is there a workaround?

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
		<PackageReference Include="microsoft.extensions.logging" Version="[6,7)" />
	</ItemGroup>
	<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
		<PackageReference Include="microsoft.extensions.logging" Version="[7,8)" />
	</ItemGroup>

Thank you!

Release version

Is there a plan to publish a release version of this library?
If not, what would be the preferred way to hook into the default netcore abstractions?

Microsoft.Extensions.Logging v2.2?

Is there a reason why this project is referencing version 2.2.0 of Microsoft.Extensions.Logging? Since .NET Core 2.1 is the current LTS version (until 3.1 is released), I assume other development teams out there have the same restrictions as us, where the 2.2 runtime is not installed on production servers.

Even though it might work referencing this project from an application using target framework netcoreapp2.1, I'd feel safer if this project were using version 2.1 (or even 2.0) of Microsoft.Extensions.Logging. Does not seem like this project requires any specific features of version 2.2.0?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.