Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Put InVEST application logs in appropriate places #215

Closed
phargogh opened this issue Oct 2, 2020 · 1 comment
Closed

Put InVEST application logs in appropriate places #215

phargogh opened this issue Oct 2, 2020 · 1 comment

Comments

@phargogh
Copy link
Member

phargogh commented Oct 2, 2020

InVEST model runs record logging to a file in the workspace, which is great for all sorts of reasons. And when running through the CLI, the CLI will write logging to stdout, which is typical for command-line applications and enables stdout to be redirected to a file, which is useful.

But when we have a GUI application, such as with the Mac application, we have almost no feedback when an error occurs, even if/when logging is, in fact, happening behind the scenes, the logging just isn't being sent to any streams that we can access.

The Windows binaries have been forever a CLI application exactly because having the command-prompt there means that we have some sort of feedback if something goes wrong. We could eliminate the command-prompt for the application if we can ensure that application logging, and especially when there's a critical failure in the application, is written to a place that we can access.

The idea here would be to add or implement application logging that:

  • Will put application logging into a place that makes sense for the operating system. On mac, this might mean the console application (and perhaps syslog will be useful for this)
  • It will make sense to have logging persist for some amount of time, but we probably don't want gigabytes of logging files to accumulate over time. Instead, maybe we could set up a rotating series of logfiles via one of python's stdlib handlers?
  • Any additions to logging should not require an overhaul of the existing logging system, we should only be adding a handler to put logfiles in the right places depending on the OS and how the application is run (via CLI, via python, via GUI).
@emlys emlys transferred this issue from natcap/invest Jan 14, 2022
@davemfish
Copy link
Collaborator

@emlys I'm a little confused why this issue was transferred to the workbench. The workbench does do application logging. Can we close this and make a more specific issue if there are improvements needed to the existing logs?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants