#1119: logging doesn't work with deluge-console because of ncurses
--------------------------------+-------------------------------------------
Reporter: cdep_illabout | Owner:
Type: feature-request | Status: new
Priority: minor | Milestone:
Component: console | Version: 1.2.0_dev
Keywords: console, debugging |
--------------------------------+-------------------------------------------
Deluge uses the Python "logging" module for warnings, errors, and
debugging statements. By default, the logging module outputs everything
to stderr (or stdout?). But this does not work with deluge-console,
because it is using ncurses. Anything written to stdout or stderr will
not print out correctly when using a program written in ncurses.
(All the debugging statements do work correctly when using deluge-console
and logging to a file instead of the terminal.)
I've come up with a couple different solutions to this.
1. Error out when the user tries to run deluge-console with a log level
above "none" and does not specify a logfile.
2. Buffer all the logging output and print it to the console right before
deluge-console closes. (After stdscr.endwin() is called.)
3. Write a wrapper around the LOG object (from deluge.log) that creates an
event every time something is output to the log. Then deluge-console can
catch this event and print the log message just like its own output
(within its own terminal). The only downside of this is that there could
be no use of log.error() or log.debug() or similar functions within the
functions that print to the terminal in deluge-console. This includes
ConsoleUI.write() and Screen.addline().
I would be willing to work on implementing any of these, but I don't want
to start work on something that definitely won't be accepted.
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/1119>
Deluge <http://deluge-torrent.org/>
Deluge project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/deluge-dev?hl=en.