Closed jpmckinney closed 2 years ago
Agreed. I am working on #15 by trying log more relevently to the user and have already removed the backtrace for the CLI output.
I will unliley use a verbose option though, just log levels and an evironment variable for that. The python backtraces are mostly only really useful if you are using the python API as the python layer for the CLI is pretty thin on top of the rust one. Better logs are more helpful when working out what happend in the rust code.
It may well backtrace though in either language if the error is one that is unexpected.
No tracebacks will be shown except for unkown erros. Just an error
level log which will be shown to the users. These error logs will be suppressed if using the Python API as the tracebacks will be more useful in that case.
I'm not sure that the backtrace for the cases in #17 is useful to a typical user. Most non-expert users, in my experience, do not know where to look in long outputs, and the backtrace is incomprehensible to them. Even to an expert user, the backtrace suggests that the error is unhandled/unexpected, whereas these are errors that Flatterer actually knows can occur.
I suggest that the backtrace in these cases can be displayed only in verbose mode.