odahoda / noisicaa

An open source DAW for GNU/Linux, inspired by modular synths
http://noisicaa.odahoda.de/
GNU General Public License v2.0
12 stars 2 forks source link

Log viewer widget #2

Open tonycpsu opened 3 years ago

tonycpsu commented 3 years ago

Hi, I found this project while searching for a mechanism to display log messages asynchronously in my Urwid applications when I discovered your LogViewer widget and other associated helpers in the noisicaa.logging module. My logging requirements at this time aren't so complex that I really need the LogManager, handler groups, etc., but the way you've put everything together and included an Urwid widget for it all is very nice, and seems like it could be useful to others if it were published as an independent library.

If you're not interested in doing the work to create said library, I'd be happy to do it and maintain it going forward.

odahoda commented 3 years ago

Hi,

the LogManager stuff is pretty specific to this app, because it runs in a main process, which collects logs from several subprocesses into a single place. In a simpler scenario you would only need the LogBuffer handler from debug_console.py and add it directly to your root logger.

I'm a bit out of touch with this project atm, but this might be a good opportunity to get back to it... I'll get back to you...

tonycpsu commented 3 years ago

you would only need the LogBuffer handler from debug_console.py and add it directly to your root logger.

Yeah, that's what I ended up doing, and it works quite well so far. Throws an Urwid exception when logging some unicode characters, but that's an upstream bug that I'm working on.

I'm a bit out of touch with this project atm, but this might be a good opportunity to get back to it... I'll get back to you...

Sounds great. In the mean time, do you have any problem with me just copying LogBuffer and LogViewer into my project?

odahoda commented 3 years ago

Sounds great. In the mean time, do you have any problem with me just copying LogBuffer and LogViewer into my project?

No problem, it's GPL.