rcx icon indicating copy to clipboard operation
rcx copied to clipboard

Log for Tasks

Open newhinton opened this issue 4 years ago • 3 comments

This will add an activity that shows information about a task-instance. That allows to view past tasks and whether errors occured, even if a device restarted or the notification was dismissed. It could further allow for disabling notifications alltogether, though this is not the goal and in the future.

This PR is a direct successor of #84 and should not be merged beforehand, although it contains every commit required. Closes #156

  • [x] Logs for tasks (time, status, what)
  • [ ] Status Indicator for task (Last run succeded, failed or is currently running)
  • [ ] find all the places where logs should be created
  • [ ] maybe switch to a better "TimeAgo" library so that it also shows seconds (and then refreshes itself appropriately)
  • [ ] decide when&how the logs should be pruned
  • [ ] fix darkmode
  • [ ] link notification and log
  • [x] expand logging information with information provided by rclone
  • [ ] remember last opened fragment?
  • [ ] implement humanReadableBytes(long bytes)
  • [ ] fix missing notification when no sync was done because it was immediately finished

newhinton avatar Jun 21 '21 16:06 newhinton

I'm not quite sure where #84 ends and this PR starts, but lets try to figure this out.

One of the ideas I'm developing in connection with RcdService (see also my comment on #156) was the concept of a 'Transfer Center' screen. This screen would show all the uploads, downloads, syncs, task executions, etc. The idea is to visualize what happens behind the scenes of the content provider. Basically a control centre style list to show the state and progress of a upload or task with a cancel/stop button.

From reading your description, this component would do one of those tasks - the log. Is that correct? Where does it retrieve its information from?

(Please don't extend your PR to include my ideas - large, omnibus-style PRs are basically guaranteed to not be merged quickly, or at all.)

x0b avatar Jun 25 '21 22:06 x0b

Generally this adds two components: a tiny, static class that writes and reads logs from internal storage and it's counterpart in the ui.

I currently use it to create a log of when a task started/finished/failed with the appropriate messages. Though it can be used for anything that seems useful. and it's pretty much still wip

newhinton avatar Jun 25 '21 22:06 newhinton

dfbc004 is the beginning To be honest, i just put it on top of the rest, because i am already using everything and i wanted to spare me the constant resolving of mergeconflicts. (yeah, still have to solve them anyway-.-) But if needed they can be reimplemented on the majn branch rather quickly

newhinton avatar Jun 25 '21 23:06 newhinton