YunoHost / issues

General issue tracker for the YunoHost project
71 stars 8 forks source link

Have a way to easily display operation logs for apps `yunohost app log` #2324

Open eauchat opened 5 months ago

eauchat commented 5 months ago

(It seems strange that I didn't find this idea somewhere else already, so please correct me if I missed it somehow.)

It would be nice to have an easy way to follow the operational logs of an app.

Why?

I often find myself discovering an app is, for some reason, not working as it should. To investigate the issue, I have to find it's logs, and often I've no idea where they are. If it's a php app, I have to figure out which php version it's using. But even when I manage to do so, I often end up wondering if there are some other logs I'm somehow missing, and feel very blind on how to resolve app issues.

How?

It would be nice if app packagers could simply inform yunohost of where the logs are located, so that it's easy to fetch them somehow. Then it could look similar to the shell system that let's you easily execute some commands as an app.

It could be something like:

yunohost app log list # get the list of log files the app is using, for example: error, log, info, nginx
yunohost app log error -n 100 -f # show the error log file and follow it's evolution (a simple shortcut to a tail of the given log file)

Don't know it's just a suggestion. That would give admins an easy overview of the different log files they can inspect when issues come up. Does it make sense to anyone else as well?