Opened 11 years ago

Closed 4 years ago

Last modified 2 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 Changed 11 years ago by Cas

  • Milestone set to 1.4.0

comment:2 Changed 10 years ago by al.cadd9

  • Owner set to nick
  • Status changed from new to assigned

comment:3 Changed 7 years ago by Cas

  • Milestone changed from 1.4.0 to Future

comment:4 Changed 5 years ago by Cas

  • Milestone changed from Future to 2.0

comment:5 Changed 4 years ago by Cas

  • Resolution set to Fixed
  • Status changed from assigned to closed

Fixed in develop: [64da09675]

comment:6 Changed 2 years ago by Cas

  • Milestone changed from 2.0 to 2.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.