Option to save log files with a click on the button in the admin page

@glyn.hudson

i’m not a php developper but this works on my windows server … try it on linux … also test what happens if you don’t have rights to access the log … i think i did not include any checking on that but the button doesn’t appear if the file is not writeable like the autorefresh button… (iswriteable check)

can someone split this message and the message here in a seperate topic ?

I updated the pr to add 2 extra options to download the emonpi update log and backup log. For the emonpi update log i added a button but for backuplog i did not (but did add the route) as i could not find where it is being used.

Please test this on an actual emonpi as i don’t have or use an emonpi i blindly programmed the 2 extra options dealing with emonpi!

Awesome! Wow, that was fast :slight_smile:

I’ve just replied to the PR on github.

@glyn.hudson would having this option on the backup module be good also ? It seems i can do the same thing as with the admin page logs. I also tested the admin logs pr on a raspberry pi with emonSD-03May16 image and it seemed to work fine as far as i could see (including removing the 00 characters). If there’s need for this option on the backup module as well i can create a new pr for the backup module or if there are other places where there are logs shown in the same manner that could benefit from a save log file option i can add it there as well but i’d need to know where then :slight_smile:

edit: just noticed when you update the emonpi and navigate away from the admin page and then go back you can still download the emonpi update log even though no log is being displayed. As long as the file exists (from a previous upgrade execution) you can download it so that’s a nice positive side effect :slight_smile:

1 Like

Yes, I suppose it would. At least for interface consistency. However probably not as important since the backup module does not get used as often.

PR has been merged. Thanks a lot :slight_smile: