Giter Club home page Giter Club logo

Comments (6)

jfversluis avatar jfversluis commented on August 16, 2024

If you use ILogger<MainPage> instead of just ILogger it does work. Not sure if that's intended.

from metrolog.

HobDev avatar HobDev commented on August 16, 2024

@jfversluis thank you, it works after implementing your suggestion. It requires the namespace using Microsoft.Extensions.Logging;

from metrolog.

roubachof avatar roubachof commented on August 16, 2024

The interface ILogger exists in 2 different namespaces:

In the Microsoft.Extensions context be sure to be using Microsoft.Extensions.Logging and not MetroLog.

from metrolog.

jfversluis avatar jfversluis commented on August 16, 2024

The interface ILogger exists in 2 different namespaces:

In the Microsoft.Extensions context be sure to be using Microsoft.Extensions.Logging and not MetroLog.

I was aware and tried that, but that doesn't change things

image

image

image

It works for ILogger<YourTypeHere> but not plain ILogger

from metrolog.

roubachof avatar roubachof commented on August 16, 2024

I'm afraid this piece is handled by Microsoft extensions and MAUI hosting DI.
But can you inject simple interfaces ILogger with ms extensions? I think I only saw generic loggers in examples...
I think all loggers must be categorized?

https://stackoverflow.com/questions/52921966/unable-to-resolve-ilogger-from-microsoft-extensions-logging

from metrolog.

jfversluis avatar jfversluis commented on August 16, 2024

Ah I see! That is... confusing 😄 oh well, at least nothing for you to do here!

from metrolog.

Related Issues (20)

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.