Power and energy loggers