Client-Side Logging in .NET MAUI with MetroLog.Maui

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 52

  • @jfversluis
    @jfversluis  2 года назад +3

    What? Video already over?! No worries, binge more .NET MAUI content right here ✨ruclips.net/video/o5X5yXdWpuc/видео.html

  • @fieryscorpion
    @fieryscorpion 2 года назад +9

    That was pretty neat. Thanks!
    Can you do a follow up video on how to setup the app in a way that if app crashes they get this little dialog saying 'Send crash details to developer?' and retrieve those logs?

  • @ralphcompton4551
    @ralphcompton4551 8 месяцев назад +1

    I would like to see whether there has been an improvement for connecting Pages to the ILogger, since this video was made.

  • @mustaphayusuf6091
    @mustaphayusuf6091 2 года назад +1

    Good work mr Gerald.

  • @MarioMora-c3i
    @MarioMora-c3i Год назад

    Thank you for your work Gerald, I really appreciate these videos...just one question.. how do you cast your real phone to the windows screen like you do on the video?... I'm curious about that, would be very useful sometimes

    • @jfversluis
      @jfversluis  Год назад

      How To Mirror Your Phone to Desktop? 🖥️

  • @josedonizeteoliveirajunior1744
    @josedonizeteoliveirajunior1744 2 года назад +2

    excellent content, thanks

  • @mkgungor
    @mkgungor Год назад +1

    Another way of using the library ruclips.net/video/8CPXDHQlBa0/видео.html

  • @engineerchaos8424
    @engineerchaos8424 Год назад

    Great video. What if you don't want to do dependency injection? How do you create an instance of ILogger in the class more dynamically?

    • @jfversluis
      @jfversluis  Год назад +1

      Create your own static field or class that you want to use. To be honest, I think you should be using dependency injection though!

  • @gerocsolutionsltd456
    @gerocsolutionsltd456 Год назад

    is there any options to filter the logs, is it possible, if we only want to see the logs which we print?

  • @davidjackson148
    @davidjackson148 4 месяца назад

    How would you get at that log externally ?

    • @jfversluis
      @jfversluis  4 месяца назад

      I guess you can create a sink to call an external service or hook into the events and files there to send those back to a server

  • @UzairAli001
    @UzairAli001 2 года назад

    Thanks for sharing this

    • @jfversluis
      @jfversluis  2 года назад

      You’re very welcome Uzair!

  • @mohammedalsabahii2
    @mohammedalsabahii2 2 года назад

    Thank you for this cool content ,, I can improve app performance using this plugin right ?

    • @jfversluis
      @jfversluis  2 года назад +2

      You could use it to identify places where you could improve your performance. This plugin will only just help you with the logging :)

    • @mohammedalsabahii2
      @mohammedalsabahii2 2 года назад

      @@jfversluis that's awesome

  • @gerocsolutionsltd456
    @gerocsolutionsltd456 Год назад

    Where is the place where it captures the shake event. how does the app know log should be generated on shake?

    • @gerocsolutionsltd456
      @gerocsolutionsltd456 Год назад

      it only works on phone and not emulator

    • @jfversluis
      @jfversluis  Год назад

      There is a setting for it. More information here: www.sharpnado.com/metrolog-maui/

  • @nalka1102
    @nalka1102 Год назад

    I can't find the issue you mention at 05:00 (and the bug is still here) on dotnet/maui, is it reported on an other repository ? Could you link me that issue if you remember where it is ?

    • @jfversluis
      @jfversluis  Год назад

      It’s not a big in .NET MAUI but this plugin: github.com/roubachof/MetroLog/issues/2
      Also it doesn’t seem to be a bug :)

    • @nalka1102
      @nalka1102 Год назад

      @@jfversluis Well I met the same issue without using the plugin so as the discussion in the issue you linked says, it's more on Microsoft's end.
      It may not be a bug but it would be convenient if you could use both ILogger or ILogger. Anyways, I will just use ILogger, thanks for your quick answer :)

  • @igoruhagel
    @igoruhagel 5 месяцев назад

    Чувак, Ты супер 👍👍👍

  • @robertholl8914
    @robertholl8914 2 года назад

    Just been playing with this over today and having an issue with no error logging going to the console just failing silently and continues. I can get the exceptions by wrapping everything in a try catch, but this isn't a solution. Any thoughts!?

    • @jfversluis
      @jfversluis  2 года назад

      Hard to say without seeing any code. If you think there is an issue somewhere, make a small reproduction project and report it on the plugin repository

    • @robertholl8914
      @robertholl8914 2 года назад

      @@jfversluis Thanks for the reply. This issue is OOTB, a few examples:
      builder.Services.AddTransient();
      // builder.Services.AddTransient();

  • @code5877
    @code5877 2 года назад

    Hi, great video! Do you think it would be possible to use this and save two seperate files of different logging levels? Example: One logfile only checks for Errors, whilst another logfile is saved which saves everything from warning to critical?

    • @jfversluis
      @jfversluis  2 года назад +1

      I think that should definitely be possible!

    • @code5877
      @code5877 2 года назад

      @@jfversluis Okay, I'm kinda new to C# and want to have logging on 2 different .xaml.cs files. How do I set it up to get the logging on both of these classes? Right now one is a mainPage and with a button click I redirect to another page. Issue with dependency injection is i need to have a logger as a constructor argument. Anyway around that?

  • @PatrikVesterberg
    @PatrikVesterberg Год назад

    Do you know if it is possible to send logs to a server. For example Grafana?

    • @jfversluis
      @jfversluis  Год назад +1

      Sure, if you setup a custom sink I suppose you could do that!

    • @PatrikVesterberg
      @PatrikVesterberg Год назад

      @@jfversluis Thank you for your input. I will experiment later this week to find out 👍

    • @jfversluis
      @jfversluis  Год назад

      @@PatrikVesterberg let me know how it goes!

  • @tech-man8751
    @tech-man8751 2 года назад

    Does App Center or Datadog supports MAUI logging?

    • @jfversluis
      @jfversluis  2 года назад

      App Center is working on support!

  • @igor5379
    @igor5379 2 года назад

    thanks!

  • @tobination979
    @tobination979 2 года назад

    Hi Gerald,
    I have a question. Could you make a viedo about AutofillIn for Andorid in Xamarin. I read articles about it but I couldn't figure out. I tried to get an answer on Stackoverflow but nobody could help me. I would really preshiate it.

    • @jfversluis
      @jfversluis  2 года назад

      I’m not sure what “auto fill in” is :)

    • @tobination979
      @tobination979 2 года назад

      @@jfversluis That's a Tool which is often used for passwords or adresses. Maybe you knoe it from Google when you can just select a box and it autofills all asked fields. It also saves passwords when you write them down.

    • @jfversluis
      @jfversluis  2 года назад

      @@tobination979 Hm interesting that it doesn’t just work out of the box

  • @VicEstampida
    @VicEstampida 2 года назад

    Hi, Great video! Actually this isn´t working at least on my x-cover 5 device. I downloaded your sample repo and when I shake the phone: System.InvalidOperationException: 'Current Root View cannot be null'. If someonae is having the same issue we can share the answer here (if we can solve. At this moment no luck). Thank you all!

    • @jfversluis
      @jfversluis  2 года назад

      Interesting! Make sure to check the issues on the plugin repo and maybe report it there too

    • @VicEstampida
      @VicEstampida 2 года назад

      @@jfversluis Solved! Just update VS to 17.4 preview. Thanks!

    • @jfversluis
      @jfversluis  2 года назад

      @@VicEstampida Perfect, thanks for letting me know!

  • @vintaatlanta6990
    @vintaatlanta6990 2 года назад

    serilog may more suitable for .NET app

    • @jfversluis
      @jfversluis  2 года назад

      I don’t think it’s made compatible for .NET MAUI :)