log analysis and plotting