Just a basic USB inline meter that logs watt-hours would do the job.
Does it work well with a USB solar panel charger? I mean does it reset and start again if input voltage and current suddenly drop dramatically.