Opened 15 years ago

Closed 8 years ago

Last modified 6 years ago

#1119 closed feature-request (Fixed)

logging doesn't work with deluge-console because of ncurses

Reported by: cdep_illabout Owned by: nick
Priority: minor Milestone: 2.0.0
Component: Console UI Version: 1.2.0_dev
Keywords: console, debugging Cc:

Description

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.
  1. Buffer all the logging output and print it to the console right before deluge-console closes. (After stdscr.endwin() is called.)
  1. 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.

Change History (6)

comment:1 by Calum, 15 years ago

Milestone: 1.4.0

comment:2 by al.cadd9, 14 years ago

Owner: set to nick
Status: newassigned

comment:3 by Calum, 11 years ago

Milestone: 1.4.0Future

comment:4 by Calum, 9 years ago

Milestone: Future2.0

comment:5 by Calum, 8 years ago

Resolution: Fixed
Status: assignedclosed

Fixed in develop: [64da09675]

comment:6 by Calum, 6 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.