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

  Рет қаралды 13,945

Gerald Versluis

Gerald Versluis

Күн бұрын

Пікірлер
@jfversluis
@jfversluis 2 жыл бұрын
What? Video already over?! No worries, binge more .NET MAUI content right here ✨kzbin.info/www/bejne/pWa7ZqyOmbyjq8U
@fieryscorpion
@fieryscorpion 2 жыл бұрын
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 10 ай бұрын
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 жыл бұрын
Good work mr Gerald.
@jfversluis
@jfversluis 2 жыл бұрын
Thanks so much!
@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 Жыл бұрын
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?
@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 :)
@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? 🖥️
@davidjackson148
@davidjackson148 5 ай бұрын
How would you get at that log externally ?
@jfversluis
@jfversluis 5 ай бұрын
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
@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/
@josedonizeteoliveirajunior1744
@josedonizeteoliveirajunior1744 2 жыл бұрын
excellent content, thanks
@jfversluis
@jfversluis 2 жыл бұрын
Much appreciated!
@PatrikVesterberg
@PatrikVesterberg 2 жыл бұрын
Do you know if it is possible to send logs to a server. For example Grafana?
@jfversluis
@jfversluis 2 жыл бұрын
Sure, if you setup a custom sink I suppose you could do that!
@PatrikVesterberg
@PatrikVesterberg 2 жыл бұрын
@@jfversluis Thank you for your input. I will experiment later this week to find out 👍
@jfversluis
@jfversluis 2 жыл бұрын
@@PatrikVesterberg let me know how it goes!
@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
@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();
@tech-man8751
@tech-man8751 2 жыл бұрын
Does App Center or Datadog supports MAUI logging?
@jfversluis
@jfversluis 2 жыл бұрын
App Center is working on support!
@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 жыл бұрын
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?
@mohammedalsabahii2
@mohammedalsabahii2 2 жыл бұрын
Thank you for this cool content ,, I can improve app performance using this plugin right ?
@jfversluis
@jfversluis 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
@igoruhagel
@igoruhagel 7 ай бұрын
Чувак, Ты супер 👍👍👍
@UzairAli001
@UzairAli001 2 жыл бұрын
Thanks for sharing this
@jfversluis
@jfversluis 2 жыл бұрын
You’re very welcome Uzair!
@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!
@mkgungor
@mkgungor Жыл бұрын
Another way of using the library kzbin.info/www/bejne/bnSziXd-htF1l5I
@jfversluis
@jfversluis Жыл бұрын
Thanks for sharing!
@igor5379
@igor5379 2 жыл бұрын
thanks!
@jfversluis
@jfversluis 2 жыл бұрын
You’re welcome!
@vintaatlanta6990
@vintaatlanta6990 2 жыл бұрын
serilog may more suitable for .NET app
@jfversluis
@jfversluis 2 жыл бұрын
I don’t think it’s made compatible for .NET MAUI :)
Take Pictures in Your App with CameraView for .NET MAUI
19:05
Gerald Versluis
Рет қаралды 8 М.
Effective Alerts with Snackbar & Toast with .NET MAUI
15:39
Gerald Versluis
Рет қаралды 12 М.
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Local Push Notifications with .NET MAUI, Easy With This Plugin!
17:29
Gerald Versluis
Рет қаралды 36 М.
The Logging Everyone Should Be Using in .NET
15:34
Nick Chapsas
Рет қаралды 89 М.
Use .NET MAUI FilePicker to Pick PDFs, Images, Videos and More!
15:24
Gerald Versluis
Рет қаралды 21 М.
Mastering .NET MAUI SwipeView for Enhanced App Experience
18:36
James Montemagno
Рет қаралды 16 М.
Error Monitoring for .NET MAUI with Sentry
20:02
dotnet
Рет қаралды 6 М.
Measure Your Application’s Performance in .NET
12:41
Nick Chapsas
Рет қаралды 37 М.
Dependency Injection with .NET MAUI Explained! Full Beginner's Guide
19:18
Localization in .NET MAUI - Adding Multi-Language to Your Apps
24:17
Gerald Versluis
Рет қаралды 19 М.
Highly Customizable Popups for .NET MAUI with Mopups
18:20
Gerald Versluis
Рет қаралды 33 М.
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН