nextron icon indicating copy to clipboard operation
nextron copied to clipboard

Adding a new example with a persistant logger

Open Psycokwet opened this issue 1 year ago • 5 comments

I tried to create a new nextron example that show and use a logger that allows for persistent logging, allowing to get logs even from a package app, since we don't have development console in this case.

I'm not sure how I can test my example, I didn't find documentation on that in the project, so feel free to give more input on how I can test that.

If ever it's good to go like that, please feel free to merge.

Psycokwet avatar May 01 '23 14:05 Psycokwet

@andirsun Hey :) Sorry, I'm not sure a lot of others maintainer still passes their head here, I've seen you have been there recently so I assigned you this, I hope I'm not bothering you tho ! Have a good day :)

Psycokwet avatar May 01 '23 15:05 Psycokwet

Hey @Psycokwet!, I was looking in to the code and its good. But before merge I want to understand the need of this patch. You mentioned that we dont have dev console on packaged app but actually we have it. Also what would be de benefit of use this logger class over packages like electron log ? https://www.npmjs.com/package/electron-log

andirsun avatar May 01 '23 21:05 andirsun

We do have something to log from packaged apps now ? A while back we didn't, I might have missed it, but I would love for you to tell me more about what we have at the moment ?

I did not know about this package tho, thank you ! I thought about sharing this bit of code because recently someone brought up again the subject of packaged app logging. But maybe I should change the example to use the package your mentioned instead.

Well, if we don't already have package app logging ^^ I'm curious to see what I missed ! Thank you for your review :)

Psycokwet avatar May 02 '23 09:05 Psycokwet

Oh my, I've wrote part of this code a long time ago, I didn't realised I used var back then 😂 Thank you for checking, and offering commit changes.

Regarding other changes proposal, The code there I've been copy pasted from the template available in the repo on main branch, I don't mind updating the code in my example, tho, maybe we should update the code in those template as well then ?

By the way, do one of you know how to test locally the creation of a my new example ?

Do you think I should change my example with and example using 'electron-log' ? I can do that instead if that's better :)

Psycokwet avatar May 04 '23 14:05 Psycokwet

We are pretty happy with electron-log. We just switched from winston and are pretty impressed. It does what one would expect. It's super easy to setup and configure and most importantly it is well maintained and the documentation is OK-ish.

pixelass avatar May 01 '24 16:05 pixelass