Skip to content

Redirect all (i.e. non-Python) application output to log file #1239

@remram44

Description

@remram44

Right now, all output from Python code, on sys.stdout/sys.stderr, is redirected to the log file.

Some people seem to be now arguing in favor of redirecting at the OS-level, so that no output would ever reach the terminal.

Pros:

  • No output in terminal
  • If some of that output is important, it would be in the log that would be submitted on error (I don't think any of it is important)

Cons:

  • Ugly non-portable system hack
  • Not Python
  • Unexpected madness; the system prints diagnostics messages related to UI toolkits, we shouldn't be messing with that
  • Clogging the logfile: these messages are often warnings from the UI toolkit or Qt, about mismatching fonts and compatiblity modes, which are completely useless to diagnose application-level errors
  • This is not what anybody does. Run any random Linux application from a terminal, you will see tons of warnings; why is this more of a problem to us than anybody else?
  • Warning/debug output from UV-CDAT components should be logged the right way. Leftover debug code should be dealt with, and will be annoying when running scripts with no recourse
  • Again, ugly non-Python system hack

For the record, I am also highly opposed to redirecting sys.stdout/sys.stderr in the first place (just use Python's convenient logging facilities).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions